Question : Using Output To in Sybase SQL IF statement

I'm having issues doing a conditional file output in sybase.

To simplify I have been using:

1:
2:
3:
if 1 = 1
select 'true';
output to z:\testerrrrr.csv


This does not work.

The real code will be closer to

1:
2:
3:
4:
5:
if (select count(acct_id) from #sales where product = 'ticket') >0
begin
select * from #sales where product = 'ticket'
output to c:\sales.csv
end


Help!

Answer : Using Output To in Sybase SQL IF statement

Taking a second thought about it, it might be possible to route with one NIC, indeed!?
Since routing is being performed on IP level, you could reach your goal by simply assigning 2 different IPs to the NIC.
Random Solutions  
 
programming4us programming4us