Skip to navigation
Mssql procedure to insert a csv file
13.01.16
ALTER PROCEDURE [dbo].[zz_insert_shortprices]( @csv_path NVARCHAR(200)) AS BEGIN TRUNCATE TABLE zz_shortprices END BEGIN SET NOCOUNT ON; Declare @query NVArchar(200) Set @query = 'bulk insert zz_shortprices from ''' + @csv_path + ''' with( fieldterminator = '','', rowterminator =''\n'')'; Exec SP_ExecuteSQL @query END
https://msdn.microsoft.com/en-us/library/ms191485.aspx
Reply
Anonymous
Information Epoch 1732600114
Worse is better.
Home
Notebook
Contact us