stryker11
asked on
Row Number in Access Query
Hi Experts
I'm trying to get row numbers for the query results using the Row_Number() Over function as shown below. But I keep getting Syntax error (Missing Operator) in Access. Can someone highlight whats wrong with the Code:
SELECT (ROW_NUMBER() OVER (ORDER BY TableReg.RegId)) As Row,TableReg.RegName, TableReg.RegCompany, TableReg.EventId, TableReg.EventLong, TableReg.Status, TableReg.SubStatus, TableReg.RegId
FROM TableReg
WHERE (((TableReg.EventId)=[form s]![FormSh eet]![Even tId]) AND ((TableReg.Status)=[forms] ![FrmNewBa dge]![Full Status] Or (TableReg.Status)=[forms]! [FrmNewBad ge]![Statu s]))
ORDER BY TableReg.RegCompany;
Thanks
I'm trying to get row numbers for the query results using the Row_Number() Over function as shown below. But I keep getting Syntax error (Missing Operator) in Access. Can someone highlight whats wrong with the Code:
SELECT (ROW_NUMBER() OVER (ORDER BY TableReg.RegId)) As Row,TableReg.RegName, TableReg.RegCompany, TableReg.EventId, TableReg.EventLong, TableReg.Status, TableReg.SubStatus, TableReg.RegId
FROM TableReg
WHERE (((TableReg.EventId)=[form
ORDER BY TableReg.RegCompany;
Thanks
ASKER
But any suggestions on the SQL Statements?
Can you please paste the exact error and line number of your error.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://support.microsoft.com/?kbid=199679