Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using quotes in a string
Message
 
 
À
18/10/2012 11:47:34
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01555242
Message ID:
01555252
Vues:
38
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--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform