I need to merge two aggregate functions in SQL Server.
Code:
SELECT
REPLACE(CONVERT(VARCHAR(8), SYSDATETIME(), 3), '/', '') AS [DDMMYY],
(count(Sno)+1) AS count
FROM tbl_demographic_reg
Output:
DDMMYY count
060114 1
I need the above output to be 06011400001 - how to get it? Thanks