PDA

Click to See Complete Forum and Search --> : help with sql statement


Thai
Mar 19th, 2000, 06:51 AM
hello,.. I have a problem with an sql statement and the insert into command.

say the string I want to insert is THAI'S POST

well since it has a ', how do you make it work with sql without making the string a variable? any suggestions?

thanks,
Thai

pardede
Mar 19th, 2000, 03:15 PM
Use chr(34) instead of '

sStr = "THAI" & chr(34) & "S POST"

JHausmann
Mar 19th, 2000, 10:31 PM
When dealing with SQL in the SQL server Enterprise manager you double up the single quote. For example:

select * from table where text like '%''%'

will get you any instance of a single quote in the field.