Oracle SQL - Unable to Update when using WITH statement -
i trying update column based on virtual dataset created via statement. have simplified statement as possible root issue. appears update not work when using statement, can't believe accurate. error getting
ora-00928: missing select keyword
here sql statement.
with temp1 ( select nn_name smb.accounts ) update sales_play_matrix_working set fy16_focus = 'y' nn_name in ( select temp1.nn_name temp1)
if convert 2nd portion of statement pure select, works...
with temp1 ( select nn_name smb.accounts ) ( select temp1.nn_name temp1)
in oracle, with
not go @ beginning of query. can go before select
. so:
update sales_play_matrix_working set fy16_focus = 'y' nn_name in ( temp1 ( select nn_name smb.accounts ) select temp1.nn_name temp1 );
Comments
Post a Comment