bulkinsert - Want to bulk import from txt file into temporary table in SQL Server 2012 -


i keep getting error:

parse error @ line: 1, column: 1: incorrect syntax near 'bulk'.

the following text. using test file 2 rows in correct format rule out causing issue.

create table #tabled1 (     vehicleid bigint,     speed decimal(9,6),     latitude decimal(9,6),     longitude decimal(9,6),     direction smallint,     gpsquality tinyint ) go  bulk insert #tabled1    'c:\users\michael.mccarthy\documents\test.txt'    (       fieldterminator = '/t',       rowterminator = '/n',       keepnulls    ); go 

use query.

declare @query varchar(1000) set @query ='bulk insert #tabled1  "c:\users\michael.mccarthy\documents\test.txt"         with(                    fieldterminator = ''\t'',                 rowterminator = ''\n''             )' exec (@query) select * #tabled1 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -