Hi everybody,I struggled with a bulk insert in procedure and i eventually found a working piece of code. Except that i did'nt understand the general rules to wrap variables.Exemple : N'BULK INSERT ' + QUOTENAME(@nomtable) + N'FROM ''' + @chemin + @filename + N''' WITH (FIELDTERMINATOR = '';'', ROWTERMINATOR = '''', FIRE_TRIGGERS)'This is working, but why are we using ''' ??Now something that's not working..SET @effacer = 'master.dbo.xp_cmdshell ''DEL '+ @chemin + @filenameEXECUTE (@effacer)Something wrong with quotes i guess....I'd like to understand the rule for this!
↧