Hassle-free live chat software re-imagined for business growth. 2 users, always free.
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
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
10 Experts available now in Live!