I have a TableA with information, like so:
TIME DATA VALUE
------------- ------ ------
120520142546 Title Mr
120520142546 Name Smith
120520142546 Smoke Yes
180303140429 Title Ms
180303140429 Name Lea
180303140429 Smoke No
I'm trying to get a TableB (which is already created, just want to insert the value) where data with the same time value are displayed in the same row, like so (and also tranform the 'Yes' by 1 and 'No' by 0) :
ID Title Name Smoke
--- ----- ----- -----
1 Mr Smith 1
2 Ms Lea 0
I kind of understand that it can be do with the PIVOT thing but i couldn't find an easy tutorial that I would understand.