Advertisement

12.26.2007 at 01:30PM PST, ID: 23043792
[x]
Attachment Details

BULK INSERT SQL Server 2000 Fixed length text file

Asked by psenn in SQL Server 2005

Tags: insert, sql, 2000, bulk, server

I would like to issue this command:
BULK INSERT TableA
FROM 'C:\Temp\TableA.txt'
WITH (FORMATFILE='C:\Temp\TableA.xml');

But I haven't moved to SQL Server 2005 yet.
SQL Server 2000 doesn't accept xml format files.
How do I replace this following?
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
<?xml version="1.0"?>
<BCPFORMAT xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<RECORD>
	<FIELD ID="1" xsi:type="CharFixed" LENGTH="2"/>
	<FIELD ID="2" xsi:type="CharFixed" LENGTH="2"/>
	<FIELD ID="3" xsi:type="CharTerm" TERMINATOR="\r\n"/>
</RECORD>
<ROW>
	<COLUMN SOURCE="1" NAME="Field1" xsi:type="SQLVARYCHAR"/>
	<COLUMN SOURCE="2" NAME="Field2" xsi:type="SQLINT"/>
	<COLUMN SOURCE="3" NAME="Field3" xsi:type="SQLVARYCHAR"/>
</ROW>
</BCPFORMAT>
 
 
[+][-]12.26.2007 at 02:11PM PST, ID: 20531197

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.26.2007 at 02:13PM PST, ID: 20531203

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: SQL Server 2005
Tags: insert, sql, 2000, bulk, server
Sign Up Now!
Solution Provided By: bhess1
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628