max - Help on "GROUP BY clause" error -
Anybody can help me with this error "The column 'Sales.' Is invalid in the selection list because It's not contained in either an entire work or group by volume. "... I spent a few days understanding this error but failed :( My query: -
SELECT SE. [No_], SH. [Selling customer no.], SH. [Selling contact number], SH. [Selling customer template code], Max (A [version no.]) Leave SAH as Sales [Sales Archive] at A (SH [DOCUMENT TYPE] = A [DOCUMENT TYPE] AND SH. [ANY_] = A [ANY_] AND SH. [DOCK_NU_JOZ] = A. [ Doc_no_size]] where (sh [document type] = '0' and sh [order] = '1')
The" max "function requires a group if you have a non-all column. So you have to add a group. [Any_] ....
In addition to Your query has been reformatted so I can read it easily - it's OK -
SH [NO_], SH [Sell-to-Customer Number], SH. [Sellers contact number], SH [Selling-from customer template code], Max (A [version no.] SAH dropout [Sale archive] A on (SH [document type] = A. [document type] and SH Group [order] = '0' and SH [order] = '1' group [no one] [no _] no = a [some_] and sh. [Doc_no_plus] = A. [group] by [doc_sh [group] No], SH [Sell-to-customer number], SH [Selling- contact NO_], SH [Sell-by customer template Code]
Comments
Post a Comment