I have a result ABCD by adding two strings AB, CD. and ABCD is a column in my another table called TEST.
So by passing these two strings i want to get the output from that ABCD column in test table.
I tried in so many ways But no use.
How can i get it.
Write below in a plsql block
SELECT UPPER(SUBSTR('AB')),UPPER('CD') INTO STRING1,STRING2 FROM DUAL;--here You will get the resulted string as a column
STRING_ADD:='SELECT '||STRING1||STRING2||' FROM test WHERE col1='||''''||Vcol1||''''; --Giving the column as a input and getting values of that column
EXECUTE IMMEDIATE STRING_ADD INTO VAR_L_VALUE;--storing that value into another string