This topic is locked
[SOLVED]

 Incorrect syntax near the keyword 'distinct'.

6/19/2007 3:10:23 PM
ASPRunnerPro General questions
A
aspcheck author

<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=5557&image=1&table=forumtopics' class='bbc_emoticon' alt=':unsure:' />

Error number -2147217900

Error description [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'distinct'.

Can someone please help with this error message.
I am trying to pull only unique records from a table that is resident in a SQL Server2000 database. I modified the SQL in the ASPRunner EDIT SQL Window and added the word DISTINCT...
select DISTINCT [CUSTNAME],

[TYPE],

[LOCATION],

etc.,

From Table Name
I also tried to create a view in the SQL Server2000 Database and added DISTINCT to the query.
Nothing seems to work. Any ideas? Suggestions?

Sergey Kornilov admin 6/19/2007

I would suggest to create a view in SQL Server on the top of this SQL query.

After that you can use this view as a datasource in ASPRunnerPro.