SQL Server Performance

convert the table into excel sheet

Discussion in 'Getting Started' started by praveenkumar, Dec 3, 2009.

  1. praveenkumar New Member

    Hai Every Body
    i have a table in my database . I need to convert the data in this table into a Excel sheet by simple Query
    Am using Sql Server 2005. Please help me
  2. Madhivanan Moderator

  3. gopalanmani New Member

    hi,
    check this code,
    OPENROWSET ( { 'provider_name' , { 'datasource' ; 'user_id' ; 'password' | 'provider_string' } , { [ catalog. ] [ schema. ] object | 'query' } | BULK 'data_file' , { FORMATFILE = 'format_file_path' [ <bulk_options> ] | SINGLE_BLOB | SINGLE_CLOB | SINGLE_NCLOB }} ) <bulk_options> ::= [ , CODEPAGE = { 'ACP' | 'OEM' | 'RAW' | 'code_page' } ] [ , ERRORFILE = 'file_name' ] [ , FIRSTROW = first_row ] [ , LASTROW = last_row ] [ , MAXERRORS = maximum_errors ] [ , ROWS_PER_BATCH = rows_per_batch ]
  4. praveenkumar New Member

    Hai Gopalanmani thanks for your reply Its very helpful for meThanks a lot
  5. lcerni New Member

  6. Madhivanan Moderator

    [quote user="praveenkumar"]Hai Gopalanmani thanks for your reply Its very helpful for me Thanks a lot[/quote]
    Ok. Can you post the code you used?

Share This Page