Variable Substitution 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('&amp;&amp;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('&amp;&amp;Project'))
from Source_Table;


The error for this code has 'percent' as an invalid identifier.

Define PROJECT = 'P747';
Create table &amp;&amp;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?
define/&amp; is a simple text substitution mechanism that does not know anything about sql. And sql and the Oracle Database server do not know anything about the text processing mechanism. So the text that results from the 'define/&amp;'substitutuin must be valid sql statement. Otherwise you get an error. 

 CREATE TABLE P747||_MU as Select percent from Source_Table 


is not a valid sql statement.

 CREATE TABLE P747_MU as Select percent from Source_Table 


is  the valid statement, an so

Define PROJECT = 'P747';
Create table &amp;&amp;Project._MU as Select 
percent
from Source_Table;


Avariable name like &amp;&amp;Project must be followed by a whitespace or and end of file or by a dot (.). The dot is removed after variable substitution.

Define PROJECT = 'P747';
Create table &amp;&amp;Project_MU as Select
percent
from Source_Table;


will not work, because the variable is &amp;&amp;Project_MU and not &amp;&amp;Project.

you mix up simple text substituion in the Toad editor ( 'define/&amp;)  with sql string functions (to_char, ||). That are different things.