Click here to Skip to main content
15,919,479 members
Home / Discussions / Database
   

Database

 
GeneralAccess...pass a value from one form to another form Pin
vtalau2-Aug-05 16:54
vtalau2-Aug-05 16:54 
GeneralRe: Access...pass a value from one form to another form Pin
Hassanur3-Aug-05 21:07
Hassanur3-Aug-05 21:07 
GeneralNeed max value Pin
bubberz2-Aug-05 4:56
bubberz2-Aug-05 4:56 
GeneralRe: Need max value Pin
Frank Kerrigan2-Aug-05 5:51
Frank Kerrigan2-Aug-05 5:51 
GeneralRe: Need max value Pin
bubberz2-Aug-05 6:36
bubberz2-Aug-05 6:36 
GeneralRe: Need max value Pin
Richard Deeming2-Aug-05 6:19
mveRichard Deeming2-Aug-05 6:19 
GeneralRe: Need max value Pin
bubberz2-Aug-05 6:42
bubberz2-Aug-05 6:42 
GeneralRe: Need max value Pin
Richard Deeming2-Aug-05 6:51
mveRichard Deeming2-Aug-05 6:51 
As the error message says, any column in your grouped SELECT statement must be in an agregate function (MIN, MAX, SUM, etc), or in the GROUP BY clause. Both of the examples in my previous post satisfy this condition.

If you need to return other columns from the row with the maximum WPID, you could use a sub-query:
SELECT
    I.WPID,
    G.WNum,
    I.OtherColumn,
    I.MoreInfo,
    ...
FROM
    WP_General_Info As I INNER JOIN
    (
        SELECT
            WNum,
            Max(WPID) As MaxWPID
        FROM
            WP_General_Info
        GROUP BY
            WNum
    ) As G
    ON I.WPID = G.MaxWPID And I.WNum = G.WNum



"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
GeneralRe: Need max value Pin
bubberz2-Aug-05 7:32
bubberz2-Aug-05 7:32 
QuestionHow to Know a stored procedure is existing Pin
SIJUTHOMASP2-Aug-05 1:51
professionalSIJUTHOMASP2-Aug-05 1:51 
AnswerRe: How to Know a stored procedure is existing Pin
Michael Potter2-Aug-05 4:10
Michael Potter2-Aug-05 4:10 
GeneralRe: How to Know a stored procedure is existing Pin
Frank Kerrigan2-Aug-05 6:01
Frank Kerrigan2-Aug-05 6:01 
GeneralRe: How to Know a stored procedure is existing Pin
SIJUTHOMASP2-Aug-05 19:30
professionalSIJUTHOMASP2-Aug-05 19:30 
GeneralImage Column and File Group Pin
devvvy1-Aug-05 21:22
devvvy1-Aug-05 21:22 
GeneralRe: Image Column and File Group Pin
Michael Potter2-Aug-05 4:21
Michael Potter2-Aug-05 4:21 
GeneralRe: Image Column and File Group Pin
devvvy2-Aug-05 17:11
devvvy2-Aug-05 17:11 
GeneralDataSet Pin
Tiger4561-Aug-05 18:56
Tiger4561-Aug-05 18:56 
GeneralRe: DataSet Pin
Marc Soleda2-Aug-05 1:11
Marc Soleda2-Aug-05 1:11 
GeneralRe: DataSet Pin
toxcct3-Aug-05 5:19
toxcct3-Aug-05 5:19 
GeneralRe: DataSet Pin
Marc Soleda3-Aug-05 5:29
Marc Soleda3-Aug-05 5:29 
GeneralRe: DataSet Pin
Frank Kerrigan2-Aug-05 21:55
Frank Kerrigan2-Aug-05 21:55 
GeneralUPDATE cmd ASP.net Access 2k doesn't work Pin
xsoftdev21-Aug-05 9:17
xsoftdev21-Aug-05 9:17 
GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Frank Kerrigan3-Aug-05 1:21
Frank Kerrigan3-Aug-05 1:21 
GeneralRe: UPDATE cmd ASP.net Access 2k doesn't work Pin
Rob Graham4-Aug-05 5:08
Rob Graham4-Aug-05 5:08 
GeneralSQL Audit trail Pin
Alomgir Miah1-Aug-05 9:09
Alomgir Miah1-Aug-05 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.