Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
SELECT CASE WHEN CAST(GETDATE() AS DATE) = DATEADD(yy, DATEDIFF(yy, 0, GETDATE()), 0) THEN 1 ELSE MAX ([' + @ColumnName1 + ']' + ' ) END Output' + ' FROM [dbo].[' + @tableName + ']'
select max (cast(ref as int)) as ref from table1 order by ref
Add your voice to the tech community where 5M+ people just like you are talking about what matters.