cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Sender Adapter - SQL-Statement

0 Kudos

Hi,

I'm using the JDBC-Sender-Adapter and need to use a SQL-Statement like this:

SELECT * FROM myTable WHERE myDate = <current_date>

Is such a dynamic-sql possible, or can I only use static sql-statements. And if yes how can I solve this problem.

many thx

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

thanks to all of you. I'm sure that this would work. But the problem is, that the oracle-DB is from our company in usa, I sit in austria and the admin of this db is not easy to reach. So I hoped for a possibility to do it with a simple select-statement in the adapter where I could use variables to build somewhat like "dynmaic sql statemens" - so long - thanks - werner

0 Kudos

Hi Michal,

thanks for your fast reply. Is this the only possibility, or do I also have access to the current date within the JDBC-adapter. Foe example somehow using additional parameters in the "Extended Mode" ?

so long - werner

Former Member
0 Kudos

Hi Werner,

if your DBs sysdate is always the current date (which it should be...), you can use a DB specific function to retrieve it. In oracle it is <b>sysdate</b>, if you use another DB product check the documentation but there should be something similar.

For Oracle the statement would be like:

<i>where mydate = sysdate</i>

Best regards

Christine

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Werner,

I think both techniques suggested by Christine and Michal should work fine.

Do let us know on the result.

Regards,

Bhavesh

MichalKrawczyk
Active Contributor
0 Kudos

Hi Werner,

inside the <b>Query SQL Statement</b> you can use <b>SQL EXECUTE</b>

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>