SQLTeam.com | Weblogs | Forums

Need help with this data



Hi All, i have a problem in here,
I have data like this

Location Date LocationStatus
21 Street 2016-11-24 Drilled
21 Street 2016-11-24 Blasted
21 Street 2016-11-24 Priority1
21 Street 2016-11-24 Priority2

and i want a make the data like this ,

Location Date LocationStatus Priority
21 Street 2016-11-24 Drilled Priority1
21 Street 2016-11-24 Blasted Priority2

Could you help me with this problem.


Tell me, how do you know Drilled is Priority 1 and Blasted is Priority 2? What links these items?

FWIW Using one column (LocationStatus) for two things (Action and Priority) will likely cause you problems


hi @gbritton ,

thanks for the reply, yeah the problem is one column have 2 data that i need to create separate.
I need to make new column to store Priority1,2
I thought if i used Pivot will solve the issue, but i still confused how to get that.


Can you answer this? The solution depends on it