1: 2: 3:
if 1 = 1 select 'true'; output to z:\testerrrrr.csv
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