Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upgraded to SQL 2000 from 6.5 getting query error now

Status
Not open for further replies.

paladin256

Technical User
Apr 16, 2002
189
US
After upgrading to SQL server 2000 our cold fusion site give me the following error:

[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near the keyword 'and'.

select * from prop_desc where prop_item_id= and belongs_to='x' order by it_level


I am not a SQL programmer and searches on google has as of yet yeilded no helpful information.

Can anyone tell me what the issue is. I thought it might be a reservered word but so far have found nothing.

Thank you.
 
select *
from prop_desc
where prop_item_id= ?
and belongs_to='x'
order by it_level

the error is being thrown because you are using a where clause on prop_item_id but no criteria is being specified for prop_item_id.

"Shoot Me! Shoot Me NOW!!!"
- Daffy Duck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top