dbTalk Databases Forums  

DTS export and sql update per line

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS export and sql update per line in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Marco Dieckhoff
 
Posts: n/a

Default DTS export and sql update per line - 10-08-2004 , 02:20 AM






Hi!

I have a table here that is replicated (like backed up) to
another database via a DTS package.

I have an indicator bit in that table "uploaded" which is 0 for
entries that have not yet been uploaded, or otherwise 1.

I replicate via
"SELECT * FROM origin_table WHERE uploaded=0"
and do an "On Sucess" SQL-Query
"UPDATE origin_table SET uploaded=1 WHERE uploaded=0";

Now the destination database is a DB2 on AS/400 which has different
rules for checking data.

When one origin entry does not suffice these rules the package is
not successful so my "on success"-Query above isn't launched and
the same entries will be exported again in the next run.

Can I program DTS to run entry by entry so that after every single
entry exported the uploaded-indicator of that entry is set?

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys

Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: DTS export and sql update per line - 10-09-2004 , 05:52 AM






Not really sure how you have this setup.

You want to update the source rows that make it over to your destination and
there is something about doing this after the datapump that is not working
for you. I presume from your description that the rows you pass to DB2 are
failing the rules on DB2?

Can you not build the query so that not only do you pick up rows that are
"uploaded = 0" but they are also rows that are valid on DB2?



--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.Konesans.com


"Marco Dieckhoff" <dieck (AT) gmx (DOT) de> wrote

Quote:
Hi!

I have a table here that is replicated (like backed up) to
another database via a DTS package.

I have an indicator bit in that table "uploaded" which is 0 for
entries that have not yet been uploaded, or otherwise 1.

I replicate via
"SELECT * FROM origin_table WHERE uploaded=0"
and do an "On Sucess" SQL-Query
"UPDATE origin_table SET uploaded=1 WHERE uploaded=0";

Now the destination database is a DB2 on AS/400 which has different
rules for checking data.

When one origin entry does not suffice these rules the package is
not successful so my "on success"-Query above isn't launched and
the same entries will be exported again in the next run.

Can I program DTS to run entry by entry so that after every single
entry exported the uploaded-indicator of that entry is set?

--
Marco Dieckhoff
icq# 22243433
GPG Key 0x1A6C95BA -- http://www.frankonia-brunonia.de/keys



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.