General discussion

Locked

Support required for SQL Server 2000

By arif9000 ·
Hi

Would really appreciate if some one can help me in developing code
for loading data from 2-3 source files (text format) into SQL server.

o Pls. find attach the scripts & the data
o Your support would highly be appreciated.
----------------------------------------------------------

1. Table structure:
CREATE TABLE temp
(
column1 varchar(11) NOT NULL,
column2 varchar(11) NOT NULL,
)

----------------------------------------------------------
2. Bulk Insert query (coyingone source file into table)
BULK INSERT Billing.dbo.cust
FROM
'c:\a.txt'
WITH
(
FIELDTERMINATOR = ',',
)

Result: [this was successfully implemented)

----------------------------------------------------------
3. Problem Area (copying three source files into one table)
BULK INSERT Billing.dbo.cust
FROM
'c:\a.txt'
'c:\b.txt'
'c:\c.txt'
WITH
(
FIELDTERMINATOR = ',',
)

Result: [Errors)

----------------------------------------------------------

PLEASE HELP ME

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Support required for SQL Server 2000

by arif9000 In reply to Support required for SQL ...

Point value changed by question poster.

Collapse -

Support required for SQL Server 2000

by VinnyD In reply to Support required for SQL ...

You need 3 lines to do this code like this:


BULK INSERT Billing.dbo.cust
FROM
'c:\a.txt'
WITH
(
FIELDTERMINATOR = ',',
BULK INSERT Billing.dbo.cust
FROM
'c:\b.txt'
WITH
(
FIELDTERMINATOR = ',',
BULK INSERT Billing.dbo.cust
FROM
'c:\c.txt'
WITH
(
FIELDTERMINATOR = ',',

The insert command can only use one "source" for input at a time.

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums