Aryan, August 11, 2020 - 2:21 pm UTC
I changed the line to
stmt := 'SELECT' || sqnm ||'.currval from dual';
execute immediate stmt into sq;
I am still getting the invalid SQL statement error.
Also, when I tried to pass a sequence name using sqnm it gives the same error.
Kindly advise .
August 11, 2020 - 2:36 pm UTC
Look very carefully at the SQL statement you're generating. Log it somewhere and I'm sure the answer will reveal itself.
Found the issue with my stmt
Aryan, August 11, 2020 - 3:07 pm UTC
Thanks Chris for the solution. It worked
August 11, 2020 - 4:39 pm UTC
Great :)
A reader, August 11, 2020 - 4:03 pm UTC
A reader, August 11, 2020 - 4:04 pm UTC
A reader, August 11, 2020 - 4:04 pm UTC
A reader, August 11, 2020 - 4:04 pm UTC
A reader, August 11, 2020 - 4:04 pm UTC
A reader, August 11, 2020 - 4:04 pm UTC
A reader, August 11, 2020 - 4:05 pm UTC
A reader, August 11, 2020 - 4:05 pm UTC