I keep getting this error:
Parse error at line: 1, column: 1: Incorrect syntax near 'BULK'.
The following is my text. I am now using a test file with two rows in the correct format so as to rule that out as causing an 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
FROM 'C:\Users\michael.mccarthy\documents\test.txt'
WITH (
FIELDTERMINATOR = '/t',
rowtERMINATOR = '/n',
KEEPNULLS
);
GO
user2772056 -- Although you probably resolved this long ago, you are using the incorrect slash. The separator character and the row-terminator should use a backslash "\", not a forward slash "/". Try this--
WITH (
FIELDTERMINATOR = '\t',
rowtERMINATOR = '\n',
KEEPNULLS
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With