You can always just create the command as a whole string (can't verify I 
got this right):
SET VAR vCommand = ('create index QueryTableIndex on' & .vQuery & '(' + 
.vColumn + ' ASC)' )
&vCommand

Karen



In a message dated 9/24/2012 3:33:21 PM Central Daylight Time, 
[email protected] writes: 
> I need to create an index on the fly knowing only variables.
>   
>  vQuery text='BillsTable'
>  vColumn text='PropIds'
>   
>  Both values are an existing table and the column name is in that table.
>   
>  This command does not work;
>   
>  create index QueryTableIndex on &vQuery (&Column ASC)
>   
>  nor this one;
>   
>  create index QueryTableIndex on &vQuery (.vColumn ASC)
>   
>  I keep getting this error message; "Error - Column vColumn is not in the  
> table BillsTable"
>   
>  This command has to be constructed with only variables.
>   
>  Can anyone help make this command work ?
>   
>  Thanks,
>   
>  Bill Eyring
> 

Reply via email to