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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-08-19 : 07:44:24
|
| blackhole writes "HiOne can load a .txt file to any table of SQL Database through DTS of Enterprise manager(AllTask>Import...).How one can do the same through Query Analyzer/Stored Procedure? There is no field delimeter in .txt file, according to the field width datas are getting imported in the table through DTS.Is with clause for FieldTerminator/RowTerminator is mandatory with Bulk Insert?RegardsBlack Hole" |
|
|
dsdeming
479 Posts |
Posted - 2003-08-19 : 08:00:40
|
| If there are no delimiters, then presumably this is a fixed-width file. You need to use a bcp format file. See Using Format Files in BOL.Dennis |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-19 : 14:38:26
|
| You could create a DTS package, then execute the package in Query Analyzer or a stored procedure using xp_cmdshell. You could also call bcp in both through xp_cmdshell.Tara |
 |
|
|
|
|
|