Click here to Skip to main content
15,910,878 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
select * from files where invID=(select invID from tblInventory where invFolderPath="@invFolderPath")

or
SQL
select * from files where invID=(select invID from tblInventory where invFolderPath="C:\")

i am getting the error like Invalid coloumn name "c:\"

i am giving the hard coded path but i want to get it dynamically..
could anyone help me
Posted
Updated 12-May-15 20:11pm
v2

1 solution

SQL - by default - do not understand double quotes, so "C:\" is interpreted as object/column name...
The proper way to identify string literals is using SINGLE quotes, like 'C:\'...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900