cancel
Showing results for 
Search instead for 
Did you mean: 

Does the JDBC Receiver support the "update / from" statement?

Former Member
0 Kudos

I want to use "FROM" with "UPDATE" in a JDBC Receiver.


UPDATE <tablename A>
FROM   <tablename A>, <tablename B>
SET    A.flag = '1'
WHERE  A.id = B.id AND
       B.salary > 5000

Is that possible?

how to write the xml?

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

you can always try SQL_QUERY

which allows you to set statements directly to the DB

http://help.sap.com/saphelp_nw2004s/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm

BTW

update in SQL92 does not work in that way right?

Regards,

michal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

It is possible to frame message for this query. U can use standard XML Structure praposed by SAP . With u r SQL query as a input to access field of the message. And action as 'SQL_DML'.

Please refer following link :

<a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm">http://help.sap.com/saphelp_nw2004s/helpdata/en/4d/8c103e05df2e4b95cbcc68fed61705/frameset.htm</a>

Regards,

Keith

Former Member
0 Kudos

Thanks, everybody.

I still have a question.

If I use query substatement in a update statement, is it sql_query or sql_dml?

just like


UPDATE t_employee
       SET   t_employee.salary = t_employee.salary + 1000
       WHERE t_employee.id IN
             (SELECT id FROM  t_manager
                        WHERE t_manager.salary < 10000
             )

B'Rgds,

YiNing

Former Member
0 Kudos

Hi,

It will be SQL_DML

Regards,

Keith

Former Member
0 Kudos

Hi YiNing,

One option would be use the query direcly in the access element and use SQL_DML as action. U can also use place holders if ur statement needs to be dynamic.

I have not tried but it is possible.

SAP Help

<a href="http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm">http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm</a>

Regards,

Sudharshan