sql question

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
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
 

Snapster

Diamond Member
Oct 14, 2001
3,916
0
0
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.
 

TechBoyJK

Lifer
Oct 17, 2002
16,699
60
91
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...