I have to do this an insert query into a variable and later use that variable but I am unable to do show because of the select *.
what I am doing is:-
a=today_39012123
b=`echo "insert into mytable select * from $a"`
echo $b
but on echo $b all aliases are showing.
I checked on terminal doing echo * prints the same thing as printed by * in $b.
how can I store that query in a varibale.
I also tried:-
b=echo "insert into mytable select \* from $a"
but I am getting output :- insert into mytable select * from today_39012123.
which is not true.
try