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 |
|
bonekrusher
Starting Member
44 Posts |
Posted - 2008-11-19 : 12:26:41
|
Hi,I am trying to use BULK INSERT to insert some xml into a table using a mapping schema. How can I do this through a T-SQL statement?assume my mapping file is h:\map.xmlBULK INSERT tbl_tableFROM 'h:\test-cvs2.xml' .....?GO Thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-11-19 : 12:34:45
|
| see thishttp://msdn.microsoft.com/en-us/library/ms191184(SQL.90).aspx |
 |
|
|
bonekrusher
Starting Member
44 Posts |
Posted - 2008-11-19 : 13:00:15
|
| Thanks. This is a bit confusing to me. I need to create a bcp format file for the table. When I try to run bcp from the command line:bcp [MYDATABASE].[dbo].[tbl_table] format nul -T -c -x -f format.xmlI get a connection error:Microsoft Windows [Version 5.2.3790](C) Copyright 1985-2003 Microsoft Corp.SQLState = 08001, NativeError = 2Error = [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [2].SQLState = HYT00, NativeError = 0Error = [Microsoft][SQL Native Client]Login timeout expiredSQLState = 08001, NativeError = 2Error = [Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure maybe caused by the fact that under the default settings SQL Server does not allowremote connections.This cant be that difficult to do...can it? |
 |
|
|
bonekrusher
Starting Member
44 Posts |
Posted - 2008-11-19 : 13:35:55
|
| Nevermind...Thanks for the help. |
 |
|
|
|
|
|