Link to home
Start Free TrialLog in
Avatar of donnatronious
donnatroniousFlag for United States of America

asked on

SQL Script - Insert comma separated values with a comma in value

In the 5th value I am entering below, I actually want to enter the comma in the middle.  I want to enter this as the 5th value '''1900-01-01''','''0001-01-01'''.  Is there some kind of escape character I can use to enter that in the manner described?

insert into CMvCM2.dbo.LA_Analysis_Var_MICLGCDt values (
'score1',
29,'-29',
536870912,
'd.MICLGCDt',
'''1900-01-01''','''0001-01-01''',
'b.MICLGDt',
'''01-01-1900''')
Avatar of Anthony Perkins
Anthony Perkins
Flag of United States of America image

You do not need to escape commas.
ASKER CERTIFIED SOLUTION
Avatar of imitchie
imitchie
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ursangel
ursangel

Why dont you directly use the whole things inside a single quoted string
i didn get your reason for using it in this way.
'1900-01-01,0001-01-01'

if im wrong, please correct me