Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Bulk insert into temp table - help needed

Author  Topic 

Jim Beam
Posting Yak Master

137 Posts

Posted - 2010-09-27 : 07:09:25
Hi all,

This is all I've done so far...

Bulk insert * into #InsertQueues
From C:\staging.txt

There are 2 tab-delimited columns, one is phone numbers, the other text. The following scrip then imports the records, so would I have to name the columns either in the txt file or statement?

insert into DBSrvr2.Queues.dbo.OutQueueFuture ( Phone,msg,datestamp,routing,Status,result,origin,service,keyword,keyid,OCKeyid)
Select Phone,msg,'2010-09-10 12:00:00.000',routing,0 as Status,result,origin,Service,Keyword,154394 as Keyid,3636748 as OCKeyid
from #InsertQueues where Phone<>'XXXXXXXXXXXX'

Thanks,

Jim
   

- Advertisement -