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
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 ]
What about this web page using CLR. I was taught not to use OPENROWSET for security reasons.http://www.sqlservercentral.com/articles/SQLCLR/68842/
[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?