473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using SQL to append records to a table from a flat file using DTS

What I would LIKE to do is noted in the subject line. What I'm finding
is that "edit SQL" appears to only be an option if I am creating a
table. If I select "append to" the option to edit SQL shades itself as
unavailable.

The reason I'd like this is that there is a datum in the flat file that
indicates whether that record should be appended to that table noted
above. There are other ways of dealing with this "problem" but it would
be nice to be able to control it using SQL, in the DTS import/export
wizard.

If the source of my data is an SQL table, I can generate an SQL query
to specify what fields to import in an append, to check for existing
values, etc...

Is there a way around this? I can reserve a table for data transfers,
regularly overwrite it with new data from text file inputs, and use SQL
to insert select fields from that transfer table to other database
tables. (From this "transfer" table, data needs to be inserted into
four separate tables in our database).

I hope this is clear. If it CAN'T be done this way, it's okay...just a
little ugly with the need to re-create the transfer table.

Aug 4 '06 #1
3 6468
This system is running MS SQL server 2000.
black...@hotmail.com wrote:
What I would LIKE to do is noted in the subject line. What I'm finding
is that "edit SQL" appears to only be an option if I am creating a
table. If I select "append to" the option to edit SQL shades itself as
unavailable.

The reason I'd like this is that there is a datum in the flat file that
indicates whether that record should be appended to that table noted
above. There are other ways of dealing with this "problem" but it would
be nice to be able to control it using SQL, in the DTS import/export
wizard.

If the source of my data is an SQL table, I can generate an SQL query
to specify what fields to import in an append, to check for existing
values, etc...

Is there a way around this? I can reserve a table for data transfers,
regularly overwrite it with new data from text file inputs, and use SQL
to insert select fields from that transfer table to other database
tables. (From this "transfer" table, data needs to be inserted into
four separate tables in our database).

I hope this is clear. If it CAN'T be done this way, it's okay...just a
little ugly with the need to re-create the transfer table.
Aug 4 '06 #2
Hi

I suggest that you use the wizard to create the DTS package initially and
then add workflow that will optionally truncate the destination table
depending on the values initially read from the file and then re-read the
file to insert the data. To read the same row multiple times see
http://www.sqldts.com/default.aspx?266 and to skip a task see
http://www.sqldts.com/default.aspx?214

John

<bl******@hotmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
This system is running MS SQL server 2000.
black...@hotmail.com wrote:
>What I would LIKE to do is noted in the subject line. What I'm finding
is that "edit SQL" appears to only be an option if I am creating a
table. If I select "append to" the option to edit SQL shades itself as
unavailable.

The reason I'd like this is that there is a datum in the flat file that
indicates whether that record should be appended to that table noted
above. There are other ways of dealing with this "problem" but it would
be nice to be able to control it using SQL, in the DTS import/export
wizard.

If the source of my data is an SQL table, I can generate an SQL query
to specify what fields to import in an append, to check for existing
values, etc...

Is there a way around this? I can reserve a table for data transfers,
regularly overwrite it with new data from text file inputs, and use SQL
to insert select fields from that transfer table to other database
tables. (From this "transfer" table, data needs to be inserted into
four separate tables in our database).

I hope this is clear. If it CAN'T be done this way, it's okay...just a
little ugly with the need to re-create the transfer table.

Aug 6 '06 #3
Thanks! I haven't a chance to try this yet, but I will soon.
John Bell wrote:
Hi

I suggest that you use the wizard to create the DTS package initially and
then add workflow that will optionally truncate the destination table
depending on the values initially read from the file and then re-read the
file to insert the data. To read the same row multiple times see
http://www.sqldts.com/default.aspx?266 and to skip a task see
http://www.sqldts.com/default.aspx?214

John

<bl******@hotmail.comwrote in message
news:11*********************@h48g2000cwc.googlegro ups.com...
This system is running MS SQL server 2000.
black...@hotmail.com wrote:
What I would LIKE to do is noted in the subject line. What I'm finding
is that "edit SQL" appears to only be an option if I am creating a
table. If I select "append to" the option to edit SQL shades itself as
unavailable.

The reason I'd like this is that there is a datum in the flat file that
indicates whether that record should be appended to that table noted
above. There are other ways of dealing with this "problem" but it would
be nice to be able to control it using SQL, in the DTS import/export
wizard.

If the source of my data is an SQL table, I can generate an SQL query
to specify what fields to import in an append, to check for existing
values, etc...

Is there a way around this? I can reserve a table for data transfers,
regularly overwrite it with new data from text file inputs, and use SQL
to insert select fields from that transfer table to other database
tables. (From this "transfer" table, data needs to be inserted into
four separate tables in our database).

I hope this is clear. If it CAN'T be done this way, it's okay...just a
little ugly with the need to re-create the transfer table.
Aug 7 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

40
by: Elijah Bailey | last post by:
I want to sort a set of records using STL's sort() function, but dont see an easy way to do it. I have a char *data; which has size mn bytes where m is size of the record and n is the...
2
by: JMCN | last post by:
hi i have a general question regarding append queries in access 97. each week i need to update my table(tblonlinereg) with new or modified records. firstly, i import the text file into my...
1
by: Heather | last post by:
I know this is a painful question and I have searched the group for past responses and none of the responses seem to cover my specific need. We have a table that contains fields like ID, Yr,...
3
by: Larry Rekow | last post by:
As part of a macro, I'm trying to automate appending a table with new records. let's say the table 2 has some new records in it, but also has a lot of identical records to table 1. I would...
2
by: Mark | last post by:
I have a FE/BD 2002 DB on a XP pro platform. I know this is ugly but it works for me...... A text file is produced from our Oracle WMS. (Average 20k records) A command button deletes all records...
5
by: Michael C via AccessMonster.com | last post by:
Hello, I have a table that I am appending 3 seperate tables into. My main problem is that each time I append the data, it simply adds to the data already there. That might sound ok, except that...
10
by: Roger Withnell | last post by:
I'm using ASP, VBScript and SQL Server. I'm also using UTF-8 character set and so my codepage is 65001 and SQL Server datatype nvarchar. I can insert unicode characters correctly into the...
4
by: MN | last post by:
I have to import a tab-delimited text file daily into Access through a macro. All of the data needs to be added to an existing table. Some of the data already exists but may be updated by the...
4
by: Rick | last post by:
Access2003 in XP I'm using the code below to append any new records from (tbl_From_Mainframe) into (tbl_Appended_Data). It takes more than a minute to search 7000 records for a dozen new records....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.