Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the below current result and just need the desired result with a different format so if someone could assist with the set analysis or the best way to do it. I am trying to avoid multiple resident load and was wondering if there is some set analysis logic for this.
Current Result
CustomerID | Location | DateTime |
---|---|---|
1001 | Area1 | 2015-08-28 0800 |
1001 | Area2 | 2015-08-28 1000 |
1001 | Area3 | 2015-08-28 1100 |
1001 | Area1 | 2015-07-20 1200 |
1001 | Area2 | 2015-07-20 0100 |
2001 | Area1 | 2015-05-01 0300 |
2001 | Area4 | 2015-05-04 0400 |
2001 | Area5 | 2015-05-07 0700 |
Desired Result
I am separating the Area1 into one column, Area2 & Area3 into another, and finally Area4 & Area5.
CustomerID | Location | DateTime | Location | DateTime | Location | Datetime |
---|---|---|---|---|---|---|
1001 | Area1 | 2015-08-28 0800 | Area2 | 2015-08-28 1000 | - | - |
1001 | Area1 | 2015-07-20 1200 | Area2 | 2015-07-20 0100 | - | - |
1001 | - | - | Area3 | 2015-08-28 1100 | - | - |
2001 | Area1 | 2015-05-01 0300 | - | - | - | - |
2001 | - | - | - | - | Area4 | 2015-05-04 0400 |
2001 | - | - | - | - | Area5 | 2015-05-07 0700 |
Thanks a lot.
Can Match pick the specific location and put it in different columns as desired above? If someone could show me how to do it, that will be very helpful. Or, may be a tutorial link that does the same thing. Thanks.