Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Error in SQL code

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-03-10 : 07:21:23
Andrew Brown writes "Hello
I am trying to select a specific name from a database and then sort the list. In the Pass I use was selecting from an Access Database and my code work fine but after I transfer it over to a SQL database I am having problems.
here is my code for selecting "Input New Project" from the database follow by ProjectName:

<CFQUERY NAME="get_id" datasource="#ODBC_datasource#">
SELECT ProjectID, management_name, ProjectName
FROM POfile
WHERE management_name = '#Client.name#'
OR ProjectName = 'Input New Project'
ORDER BY ProjectName IN ('Input New Project'), ProjectName
</CFQUERY>

I am getting a error regarding using IN. Is there any way I can select 'Input New Project' first then follow by ProjectName?"

Wanderer
Master Smack Fu Yak Hacker

1168 Posts

Posted - 2003-03-10 : 07:30:11
Sounds like your trying to use the variable allocation in Access ?

Change Order by to :

ORDER BY ProjectName

Would seem to me to give the same result, and not use illegal SQL.

*#&#* *#&#* *#&#* *#&#*

Chaos, Disorder and Panic ... my work is done here!
Go to Top of Page
   

- Advertisement -