• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

sql question

I'm trying to get an application working, and an error is being thrown when trying to process this query..

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'users'.

The problem is

SELECT DISTINCTROW First(users.nickname) AS nickname,

the users.nickname isn't being recognized. If I run the query in query analyzer it recognizes all the columns that are from items, but not from users, and I think its because the FROM statement only says from items, so the column nickname from users doesn't compute..

I'm not quite sure how to rewrite the query though, i think the inner join needs to be part of the FROM clause
 
For others to help could you specify what sql enviroment you are using. From the sql you have given the aggregate functions (first) and dictinctrow hints that you are using MS Access, however you say you are using query analyzer which is SQL Server based. Some sql functions are not available on Access and visa versa.
 
Originally posted by: Snapster
For others to help could you specify what sql enviroment you are using. From the sql you have given the aggregate functions (first) and dictinctrow hints that you are using MS Access, however you say you are using query analyzer which is SQL Server based. Some sql functions are not available on Access and visa versa.

yup!

i actually just figured this out.. I didn't read the instructions. The code is setup as default for access, and what I found was there is another document that you rename as the access one that substitutes access sql for ms-sql sql.

so the code is completely different.

case closed...
 
Back
Top