Why I can't write any import/export sql statement to a file inside a block of if statement?
"input into" output to" causes always syntax error as long as they are residing inside a block of if condition.
What a solution can I have against it? i.e. when I want to import from a text file into a table under a specific conditions (depending on the result of an 'select' statement).
if exists (select COLUMN1 from TABLE1) then
input into TABLE2 from c:\FILE.TXT