Dynamic creation of Excel file by exporting MSSQL data

  • I have a situation where in I need to create a excel file from java code for which data is coming from a select statement of MSSQL.

    I was doing this kind of stuff when I was working with MYSQL5.0 by using the following code.

    SELECT a,b,a+b INTO OUTFILE '/tmp/result.xls'

    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'

    LINES TERMINATED BY ''

    FROM test_table;

    Any thoughts/suggestions?

  • I suggest SSIS. It can do that kind of thing quite easily.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Hi,

    this topic came up a while back. Please check this to see if it helps at all: http://www.sqlservercentral.com/Forums/Topic487837-19-1.aspx

    regards

    GermanDBA

    Regards,

    WilliamD

  • thanks guys..i got it...

Viewing 4 posts - 1 through 3 (of 3 total)

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