Connecting Database using DS routine

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Connecting Database using DS routine

Post by paddu »

Can we connect to Database ( example: oracle) and query to get any specific value in DS routine???

Thanks
Paddu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes.
-craig

"You can never have too many knives" -- Logan Nine Fingers
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

Can you please tell how the syntax for DS routine could be to connect to Database??
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Now, that's an entirely different question - and not one to be answered in a simple post. Search the forums for "BCI" and perhaps even "SQLExecDirect" to get some idea of what road you are looking to travel down.

For example, a recent series on the subject:

viewtopic.php?t=115619
-craig

"You can never have too many knives" -- Logan Nine Fingers
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

Thanks Chulett.

I checked the recent post after asking for the syntax here .

I will surely search the forum.

Thanks
paddu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Out of curiousity, why do you ask? What are you thinking about doing that you would need something like this? I have been working with the tool for quite some time and never once felt the need to do any such thing, hence the question.
-craig

"You can never have too many knives" -- Logan Nine Fingers
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

Yes sir !!! i have something in my mind ..


At one point i needed to get a date from oracle table to use in job sequences .Basically identify the month of date from oracle table and process rest of the sequence.

According to our process , the date i am trying is always previous month date from the current month date .

I mean , if the process is running February then the month i am trying to get from oracle is January.

So i resolved my issue by creating a small routine to get previous month from the current date .
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So... you 'resolved your issue', meaning you actually wrote a routine to connect to Oracle? Or did something else? :?

I would do something like this in a simple little Server job, if you felt it really needed to come from Oracle.
-craig

"You can never have too many knives" -- Logan Nine Fingers
paddu
Premium Member
Premium Member
Posts: 232
Joined: Tue Feb 22, 2005 11:14 am
Location: California

Post by paddu »

[quote="chulett"]So... you 'resolved your issue', meaning you actually wrote a routine to connect to Oracle? Or did something else? :?
quote]

No i did not write a routine to connect to Oracle .

I wrote a routine to get previous month value from the current date (@DATE).
I did not use oracle date at all. Basically made by job easy :wink:
Last edited by paddu on Tue Feb 05, 2008 1:14 pm, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Well, there you go... much smarter solution. :wink:

Time to mark your post as Resolved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply