cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Adapter with Parameters

Former Member
0 Kudos

Hi Guru's.

I have a sender adapter which is polling an oracle database. I am doing a direct SQL statement, so not working with Stored Procedures. Is it possible to have a select statement with a parameter value, see below:

I need to achieve the following: SELECT * From TABLE where date = <system date>

<system date> is the parameter.

Hope someone can help me out.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Is your requirement limited to the above query ? Then you can use DB system variables like SYSDATE for Oracle or GETDATE for MS SQL to extract system date.

Something like

SELECT * From TABLE where date is sysdate.

Thanks,
Sathya

Answers (3)

Answers (3)

sahana_ps
Participant
0 Kudos

SELECT * FROM <TABLE_NAME> WHERE <DATE_FIELD_NAME> = SYSDATE

iaki_vila
Active Contributor
0 Kudos

HI,

As far as i know for 7.1 versions and below is not possible without stored procedures.

You could make a differente aproximation if avoiding stored procedures is mandatory. Convert the Sender JDBC in Receiver JDBC. You simulate the polling with a job in the ABAP stack which call the service. In other side, i think you need to work with the data selected and send it to another site, ok, you could take this data in the abap stack (response in the job service call)  and send it with other PI service interface.

Regards.

vijay_kumar133
Active Participant
0 Kudos

Hi ,

Yup the above SQL statements workes fine unless the parameters are standard one like Date....

If you need custome parameter you need to go for SP.

Regards

Vijay