Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using quotes in a string
Message
 
 
To
18/10/2012 11:47:34
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01555242
Message ID:
01555252
Views:
39
yes

>so, if I'm understanding you - I need to have
>
>
>Set @BulkCmd = 'Bulk Insert qryICECLImport from ' + @filename + ' with (FieldTerminator = '','', RowTerminator = ''\n'')'
>
>
>Where the '' is actually 2 single quotes?
>
>
>>You have to double single quotes inside a string literal
>>
>>>
>>>I need to put
>>>
>>>Bulk Insert qryICECLImport from @FileName with (FieldTerminator = ',' , RowTerminator = '/n')
>>>
>>>
>>>into a string - or at least I'm assuming I need to because SQL is not liking the parameterized file name, it's got the red squiggly line and says 'expecting INTEGER, STRING...' and perhaps that's what I should be asking about - but anyway would someone please remind me how to have quote marks within quote marks. I'm really missing being able to use single quotes (') AND double quotes (")
>>>
>>>Thanks
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform