Saving results to a file

  • I am running the following snippet of code:

     

    ACCOUNT = case

     when left(m.gldebitacct, 6) = '700048' then '40700-497-00'

     when left(m.gldebitacct, 6) = '011195' then '60700-470-05'

     when left(m.glcreditacct, 6) = '700048' then '40700-497-00'

     when left(m.glcreditacct, 6) = '011195' then '60700-470-05'

     else 'error'

     end,

     

    If there is an error, I would like to save the rows with 'error' to an excel spreadsheet, ot to a .csv file.  Is that possible?

     

    Thanks,

     

    Dave

  • Put them into a table and then use DTS to export to XLS.  About 3 other questions have been asked tonight in the forums on exporting to XLS or CSV files...  Look at a couple of them for ideas of how to accomplish this (some use DTS, some use Bulk Copy from a command shell)...

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply