Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Update through native sql

Former Member
0 Kudos

Dear all,

i have written a select query for Update oracle database through Native SQL.

Query is

W_FLG = 'Y'

UPDATE LPR_LEAVEPLAN_TRN SET FLOWLEVEL = W_FLG WHERE EMP_ID = '11200010'.

LPR_LEAVEPLAN_TRN is my oracle table

i want to change the field of that table is FLOWLEVEL with W_FLG where employee id is 11200010

here update is not working.

can any body tell me how can update work with oracle database.

2 REPLIES 2

Former Member
0 Kudos

Hi ,

Try to put the COMMIT WORK. and check you are populating the employee number properly or not..

If leading zeor's exist then need to pass those too..

0 Kudos

i m doing same way........like this

EXEC SQL.

OPEN DBCUR FOR

UPDATE LPR_LEAVEPLAN_TRN SET EMP_ID = '11210010' WHERE FLOWLEVEL = 1.

if sy-subrc = 0.

clear: W_FLG.

endif.

commit work.

CATCH cx_sy_dynamic_osql_error.

MESSAGE `Error in update!` TYPE 'I'.

ENDEXEC.

Here,

LPR_LEAVEPLAN_TRN is my oracle Table

EMP_ID is (i want to Change)

Plz Help