Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Which task to use

Which task to use

Which task to use


I am trying to figure what DTS tasks to use to accomplish the below scenario.

1.  Query table/column A.JOBID where A.STATUS = PUSHED.

2.  For each A.JOBID from query 1 set A.STATUS = PULLING.

3.  Query oracle table B and insert into sql table C each record where B.STATUS = PULLING.

4.  When 3 is done set each A.JOBID = PULLED.

My problem is how do I take the results of query1 and store them (as variables? parameters?) to be used in queries 2,3,4?


RE: Which task to use

You can do 1 & 2 as a join, so you can miss a step out. It's been a while since I've used Oracle with SQLServer (and it was the other way round DTS to import Oracle data) so as it's bed time where I am I'll have to leave it as that for the minute.

The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244: How to get the best answers before posting.

RE: Which task to use

If you're trying to do a join across the two databases, you'll need to look into setting up a linked server as well.  Because of syntax differences, you might be better off setting up a "staging table" on one database or the other, and doing the manipulation all in one place.

Is A an oracle or SQL Server table?

----signature below----
I'm pushing an elephant up the stairs

My Crummy Web Page

RE: Which task to use

A is oracle. And I need to do everything from within DTS.

What I figured out so far is to use a "Execute SQL Task"  and place the results in a recordset global variable (Step 1).

Now I need to figure out how to loop thru the recordset and for each record perform:

Step 2
Step 3
Step 4

I am thinking that maybe step 1 needs to be a parent package
and then steps 2,3,4 are seperate packages that get called from 1?? Any ideas? Anybody?


RE: Which task to use

I think you're going down a bad road here.  Bringing the necessary oracle data into your SQL database somehow is probably a better idea (IMO) , because it would let you do things in a set-based fashion.

You can do this by setting up a linked server, or actually creating a step in your DTS to bring the data across into a staging table as I suggested.

Can you share what you've done so far?

Hope this helps,


----signature below----
I'm pushing an elephant up the stairs

My Crummy Web Page

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close