cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic SQL

park_saeiam
Explorer
0 Kudos

Hi all

Could you please to give me any idea? If I need to build dynamic SQL on JDBC adapter. For the example

select * from table where field1=... and field2=....

How I can do?

Thanks

Park

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

I hope try..

inside the Query SQL Statement you can use SQL EXECUTE

which can execute a stored procedure

in which you can do

SELECT * FROM myTable WHERE myDate = <current_date>

http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm

also see the below links..

Regards

Chilla..

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Which adapter are you using? Sender or Receievr?

Can you give more detailed example?

Regards

Bhavesh

park_saeiam
Explorer
0 Kudos

Hi

I intend using for sender. For the example.

I need to build sql from last update as I query last before. So I have to check what's last update after that use that date for some calcluate after that pass this value into SQL for query the data.

Thanks

Park

udo_martens
Active Contributor
0 Kudos

Hi Park,

JDBC sender adapter is polling and waiting for an configureable intervall. An update flag is required. You can put pure SQL. For example

select * from myTable where flag ='X' and myField1='myValue'

Additional an Update statement is required to set the flag:

update myTable set flag='X' where flag<>'X'

Regards,

Udo