January 27, 2007 at 9:53 am
Example: I have the query "Select column1,column2 from table where column1 like 'a%'"
I waht the Sql scripts to create a excel file in c:\test.xls path having the results of the query. Please help me!!
January 27, 2007 at 11:29 am
Use DTS or BCP to do this...
You can use OPENROWSET also...see the following link...
http://aspalliance.com/904_Generating_Excel_File_Using_SQL_Server_2000
MohammedU
Microsoft SQL Server MVP
January 27, 2007 at 12:48 pm
Mohammed Uddin,
Thanks a lot. I will try the OPENROWSET.
Regards:
Narendra Babu A
January 27, 2007 at 10:20 pm
Good luck...
MohammedU
Microsoft SQL Server MVP
January 28, 2007 at 3:53 am
Friend, I have created the Template of the Table structure, changed the column names and Table name. Run the scripts in Different Database. When I execute the procedure I got the following error:
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' supplied invalid metadata for column 'item'. The data type is not supported.
OLE DB error trace [Non-interface error: Column 'item' (ordinal 1) of object 'SELECT item,Warehouse,Quantity FROM [Sheet1$]' reported an unsupported value for DBTYPE of 0].
Please can you help me to solve this error.
Thanks in advance.
Regards:
Narendra
January 28, 2007 at 2:05 pm
What is the data type for "item" column?
Try using DTS.
MohammedU
Microsoft SQL Server MVP
January 29, 2007 at 1:29 am
the data type for "item" column is nvarchar(30).
Please can help me how to you DTS not through wizard through sql scripts?
Thanks in advance.
Regards:
Narendra
January 29, 2007 at 8:39 am
Narendra,
Check this out.
http://www.sqlservercentral.com/columnists/yShlafman/thebestkeptsecretaboutsqlqueryanalyzer.asp
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply