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.
Author |
Topic |
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2010-08-19 : 13:35:13
|
Here's my code...I'm trying to pull in a text file that is pipe-delimited (pipe=HEX '7C'). DROP TABLE Tickets_INPUTFILESELECT * INTO Tickets_INPUTFILEFROM OPENROWSET('Microsoft.Jet.OLEDB.4.0','Text;Database=D:\Source','SELECT * FROM TIX_LW.txt')GOBut I'm not getting my data split up (by the pipes) into appropriate columns. What am I missing here?Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL & VB obviously! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-19 : 13:53:37
|
use a format file and specify file delimiter as pipe------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2010-08-19 : 14:11:44
|
But I want to create the table on the fly, not based on a pre-established table.Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL & VB obviously! |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-19 : 14:13:58
|
does that mean table structure keeps on changing?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
Xerxes
Aged Yak Warrior
666 Posts |
Posted - 2010-08-19 : 14:43:43
|
It might.Semper fi, XERXES, USMC(Ret.)------------------------------------------------------The Marine Corps taught me everything but SQL & VB obviously! |
 |
|
yosiasz
Master Smack Fu Yak Hacker
1635 Posts |
Posted - 2010-08-19 : 15:31:57
|
is it possible for you to post sample txt file?If you don't have the passion to help people, you have no passion |
 |
|
|
|
|