export data of all table to RAW files

  • Hi,

    I have to export data of all table to RAW files.

    Here is my steps

    1. fetch table name to export data

    2. created sql Statement

    3. fetch data from sql statement to variable.

    4 I have to write data in RAW file and file name should be table name(How i can achive this step).

    Please let know if anybody have any idea.

    Thanks in advance...

    From

    Manish Jain

  • Hi,

    If RAW file means any csv file, you can use DTS/SSIS by taling the table as source object and the text file as destination.

    [font="Verdana"]Renuka__[/font]

  • Hi,

    Thanks for reply. i am new about Raw file desination but i think so raw file has different format.

    Following line i had copied from MSDN and i think so that file have .raw extension.

    "The Raw File destination writes raw data to a file. Because the format of the data is native to the destination, the data requires no translation and little parsing. "

    Please let me know if i am wrong.

    Thanks

    Manish Jain

  • So... what "destination" did you have in mind? If it's SQL Server, lookup the "-n" parameter of BCP in Books Online which says...

    -n

    Performs the bulk copy operation using the native (database) data types of the data. This option does not prompt for each field; it uses the native values.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Hi,

    Thanks for your reply,

    At this stag i am dumb... i am looking for some other good solution.

    Would you please suggest me any other good way?

    Thanks

    Manish Jain

  • manish.jain (9/1/2008)


    Hi,

    Thanks for your reply,

    At this stag i am dumb... i am looking for some other good solution.

    Would you please suggest me any other good way?

    Thanks

    Manish Jain

    I'm pretty much dumb about SSIS myself because I use BCP to do these things... so I can't help. Hopefully, this post will serve as a "bump" wher someone else who actually has SSIS experience can serve as a guide.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • manish.jain (9/1/2008)


    Hi,

    Thanks for your reply,

    At this stag i am dumb... i am looking for some other good solution.

    Would you please suggest me any other good way?

    Thanks

    Manish Jain

    When you tried Jeff's suggestion, what was it that didn't work for you?

Viewing 7 posts - 1 through 6 (of 6 total)

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