|
Posted by M Bourgon on 09/02/06 00:29
I have a file I'm trying to do some non-set-based processing with. In
order to make sure I keep the order of the results, I want to BULK
INSERT into a temp table with an identity column. The spec says that
you should be able to use either KEEPIDENTITY or KEEPNULLS, but I can't
get it to work. For once, I have full code - just add any file of your
choice that doesn't have commas/tabs. :)
Any suggestions, folks?
--create table ##Holding_Tank ( full_record varchar(500)) -- this
works
create table ##Holding_Tank (id int identity(1,1) primary key,
full_record varchar(500)) --that doesn't work
BULK INSERT ##Holding_Tank
FROM "d:\telnet_scripts\psaxresult.txt"
WITH
(
TABLOCK,
KEEPIDENTITY,
KEEPNULLS,
MAXERRORS = 0
)
select * from ##Holding_tank
Navigation:
[Reply to this message]
|