Getting the resultset from Oracle stored procedure

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
jagadhish
Participant
Posts: 14
Joined: Thu Jan 19, 2006 6:05 am

Getting the resultset from Oracle stored procedure

Post by jagadhish »

Hi,

I have a oracle procedure which returns resultset to datastage using Ref. cursor.

Understood from the earlier posts that STP stage does not support REf. cursor. Can I use ODBC/OCI stages to call that procedure and get the resultset data from that procedure?


Is there any other way to get the resultset from procedure other than using the Ref cursor...

Thanks in advance...

jagadhish
REGARDS,
JAGS
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You can use ODBC/OCI to call the stored procedure. which will return the result set to datastge.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
jagadhish
Participant
Posts: 14
Joined: Thu Jan 19, 2006 6:05 am

Post by jagadhish »

Hi,

I have been treing the same(using odbc stage), but could not make it.

How I can map the cursor resultset to columns defined in the odbc stage?

Any help is greatly appreciated.
REGARDS,
JAGS
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Call the stored procedure in input tab, write into a intermediate table, and select the table in output tab.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
jagadhish
Participant
Posts: 14
Joined: Thu Jan 19, 2006 6:05 am

Post by jagadhish »

Hi,

We cant write embedded Sql in the stages( client requirement), Any Insert or Select should be done through stored procedure. So I need to call this procedure to get the resultset and map it to the output columns.

We can call procedure and declare all the columns in the in the output tab of odbc stage , but how should the cursor resultset is mapped to those columns?

I'm not getting the correct syntax which will map the resultset to the columns.

what is the call syntax i should write for this?

thanks in advance,
Jags
REGARDS,
JAGS
Post Reply