Skip to Content
Former Member
Mar 08, 2017 at 06:23 PM

Input/Output after if condition

169 Views Last edit Mar 10, 2017 at 11:26 AM 3 rev

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

end if;