I am working in TOAD for Oracle and am trying to use variable substitution in my coding.
I have been able to get variable substitution to work in the code body pressing F5:
Define Value = '1.5'
Create table XX_DELETEMEEE as Select
percent * To_Number('&&Value') Test
from Source_Table;
I have been unable to make the variable work in the same way for text as table names or column names:
Define PROJECT = 'P747'
Create table XX_DELETEMEEE as Select
percent (To_CHAR('&&Project'))
from Source_Table;
The error for this code has 'percent' as an invalid identifier.
Define PROJECT = 'P747';
Create table &&Project||_MU as Select
percent
from Source_Table;
The error for this code has table name as an invalid option.
Any ideas on how to make this work while not straying to far in methodology?