accept y CHAR PROMPT ‘Please type 1 for TEST_104 or type the table_name:- ‘
then I type 1 for the default table or for any other table i type test_105.
then i checked like below from dual its working fine.
select decode(‘&y’ ,’1′,’TEST_104′,’&y’) from dual;
But in select statement its not working.
SELECT * FROM decode(‘&y’, ‘1’, ‘TEST_104′,’&y’) ;—-> not working so i have used the cast function like below.
SELECT * FROM table (cast(decode(‘&y’, ‘1’, ‘TEST_104′,’&y’))) ;—> still not working.
Any suggestions please.