Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I have extracted some results using the follwing query with loop.
SQL
declare @TwoByteCodes_ID INT
while(@TwoByteCodes_ID <=355)
set @TwoByteCodes_ID=1
BEGIN
select Byte_0F,Byte_0E,Comments,
dbo.fn_GetTwoByteFamily(Byte_0E, Byte_0F)  AS Family,
dbo.fn_GetTwoByteConcatenatedIDVs(Byte_0E, Byte_0F) AS Internal_Die_Name
from Design_june27_2011.dbo.Autoselect_TwoByteExtendedCodes 
set @TwoByteCodes_ID=@TwoByteCodes_ID+1
END
go

Could i export these query results into a new excel sheet along with headers in the same query?

kindly help.
Posted
Updated 19-Oct-11 23:04pm
v2

SQL does not know Excel so you can't directly export to Excel from SQL Server.

You can copy the results of your query from Management Studio and paste them in an Excel sheet.
 
Share this answer
 
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900