Choose in SQl server 2012


Select CHOOSE(1,'A','B','C')


Select CHOOSE(Rno,Fld1,Fld2,Fld3,Fld4) from
(
Select 'A' as Fld1, 'B' as Fld2, 'C' as Fld3, 'D' as Fld4
) AllData

Cross Apply (Select Top 3 ROW_NUMBER() Over (order by Name) as Rno From sys.columns) D 

Comments

Popular posts from this blog

Shared / Static Class in vb.net/C#

Xamarin Forms : PopUp Page with RG.Plugins.Popup

Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)