Hi
For migration purpose i am building sql string dyanmically by the dbf data , making some translation and finally moving it into sql server 2000, many of the places old data contains single quote mark as given below
SELECT OID FROM InsurancePlanHeader WHERE PlanCode = 'PHYSICIAN'S MUTUAL' AND DELETEOID = '0'
Here 'PHYSICIAN'S MUTUAL' produces error message
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'S'.
Server: Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark before the character string ''.
since this string formed dyanmically by the data , i am not able to control this situation.Pl. suggest how ot handle this situation.
For migration purpose i am building sql string dyanmically by the dbf data , making some translation and finally moving it into sql server 2000, many of the places old data contains single quote mark as given below
SELECT OID FROM InsurancePlanHeader WHERE PlanCode = 'PHYSICIAN'S MUTUAL' AND DELETEOID = '0'
Here 'PHYSICIAN'S MUTUAL' produces error message
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'S'.
Server: Msg 105, Level 15, State 1, Line 1
Unclosed quotation mark before the character string ''.
since this string formed dyanmically by the data , i am not able to control this situation.Pl. suggest how ot handle this situation.