Click here to Skip to main content
15,917,328 members

Comments by Abdulnazark (Top 14 by date)

Abdulnazark 13-Mar-15 16:03pm View    
declare @in varchar(max),@sql Nvarchar(max)

set @in=cast((select stuff((select ',['+datenumber +']' from ##t2 group by datenumber for xml path('')) ,1,1,'')) as varchar(max))

set @sql='SELECT *
FROM (
SELECT
code,
dt,
datenumber
FROM ##t2
) as s
PIVOT
(
MAX(dt)
FOR [datenumber] IN ('+@in+')
)AS p'
exec(@sql)
Abdulnazark 13-Mar-15 15:16pm View    
thanks..
Abdulnazark 12-Mar-15 12:24pm View    
Sql view only available for Query not for table
Abdulnazark 2-Mar-15 9:08am View    
Deleted
don't use Clipboard, see the link
http://www.aspsnippets.com/Articles/Export-GridView-to-Excel-in-ASPNet-with-Formatting-using-C-and-VBNet.aspx
Abdulnazark 2-Mar-15 2:35am View    
did you enabled the

sp_configure 'show advanced options', 1
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1
GO
RECONFIGURE;
GO