I get an unexpected "end of file" error while trying to execute the following piece of code in the bash / ksh shell. I'm assuming the problem is with using the "execute immediate statement"
for i in *
sqlstr="create table $tname$i as select account_no, balance from records_all"
execute immediate $sqlstr;
try.ksh: syntax error at line 10 : `<<' unmatched
try.sh: syntax error at line 15: `end of file' unexpected
Appreciate your guidance with the correct syntax.