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 - 2004-01-23 : 07:12:25
|
| Lucio Gayosso writes "Hello!I have the following configuration for a Client/Server app:Server A contains a server program that reads a text file and triggers a BULK INSERT commandServer B holds the SQL Server DatabaseWhen I try this basic statementbulk insert DBNAME.TABLENAME from FILENAMEWITHPATH WITH ( FIELDTERMINATOR = '~')I get an error.If just one server contains both the server program and database everything works OK.I see that the syntax for the BULK INSERT states:BULK INSERT [ [ 'database_name'.] [ 'owner' ].] { 'table_name' FROM 'data_file' }So I don't see how I can specify the server or ODBC Datasource to use.Any suggestion will be greatly appreciatedRegards,Lucio Gayosso" |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-01-23 : 08:36:52
|
| You will need to connect to the server to run the bulk insert.You connect using a linked server then run the bulk insert using sp_executesql or better call an SP to do it.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|
|