question

nvhungss avatar image
nvhungss asked

Set result of select query to variable in sql plus

I have a select query in sqlplus

select trim(status) from AML.amletl_load_status where mov_date in(select max(mov_date) mov_date from AML.amletl_load_status);

Then i want to set result return as variable A I use but it seem not work:

getStatusETL
()
{select trim(status)from AML.amletl_load_status where mov_date in(select max(mov_date) mov_date from AML.amletl_load_status);!}
sqlwindows-server-2008-r2database-objects
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.