cancel
Showing results for 
Search instead for 
Did you mean: 

How to use a global variable for reading a query resultset in JDBC lookup?

Former Member
0 Kudos

Hi Friends,

Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.

Thanks,

Amit.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thank you all for the help. Highly appreciated !

Former Member
0 Kudos

Hi!

I am not sure but I thought this link will be useful to you which contains and webinar by William Li....regarding Mapping Enhancements. In this you can see JDBC look up in detailed manner..

[https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d33e5c-e8c2-2a10-6397-c35172c8b280]]

Also check whether u can write one code seperately and may be u can go through Stored Procedure also right.

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/11749] [original link is broken] [original link is broken] [original link is broken];

Regards::

Amar Srinivas Eli

JoelTrinidade
Active Contributor
0 Kudos

Hi Amit,

Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.

Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]

Rgds

joel