Hi everyone, I'm trying to build a new cube and I'm struggling to figure out a solution when I got the same id that change contract during the year, anyway I know this is TSQL forum my question is:
I got this code,
SELECT ccoffice, customername, setdate, ccoffice + cast(YEAR(setdate) as varchar (2)) + CAST(MONTH(setdate) as varchar(2)) AS Expr1 FROM headquarter
The row is
100500 Paris 2014-04-13
the result is :
100500 Paris 100500*4
I'm looking for
100500201404
Even if I know that's is not a solution for my new cube ( but that's another story).
Any suggestion?
Thanks