cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC: Dynamic select statement

Former Member
0 Kudos

Hi,

I am working on a JDBC to SAP integration. I am trying to SELECT data from table for a specific time interval.

In the JDBC configuration i am using the Query SQL Statement

For example: select * from X where time='20080808'

Now is it possible to use for example the system date and time of the server where pi is installed or any other dynamic data?

Maybe like this: select * from X where time =@sysdate

If it is possible how? If not why?

I appreciate your help.

Thanks in advance...

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

Yes, it is possible. In mapping, u may map the target structure with currentDate standard message mapping function of XI.

Regards,

Prateek

Former Member
0 Kudos

Hi Prateek,

Now i am using Sender JDBC. Isn't it first selecting the data with the Query SQL Statement and then mapping? Am I missing something?

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

In case of receiver JDBC you can map todays date to the select statement and make the select statement dynamic, however in the sender it can't be done. The work around may be to call the stored procedure from the sender adapter and using the stored procedure construct the select query dynamically.

Thanks

SaNv...

prateek
Active Contributor
0 Kudos

At sender the above reply couldnt be applied.

U have to use some stored procedure then which may hanldle things at the sender system.

Regards,

Prateek

Answers (1)

Answers (1)

dharamveer_gaur2
Active Contributor
0 Kudos

Sender site you have to write sql query:select sysdate from dual. u can also use with other table, if u r selecting some column from any table.