Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query find all locations

Author  Topic 

wsilage
Yak Posting Veteran

82 Posts

Posted - 2013-02-20 : 13:39:37
I need to find a way to capture if all locations that are termed under a pcs and not just 1 or two locations are. I am not sure how to do that. However, there is a field called pcsa_id2. This field has how many location there are. I am sure I can us that field some how, just unsure how to write code for that.

Example if you look at the pcsa_id1 this tells you that there are 3 locations and they are all termed

I am not sure how to capture this.

pro_pcs (distinct) Pcsa_id1, Pcsa_id1 term location
00000254 00000254 0001 02/20/13
00000254 00000254 0002 02/20/13
00000254 00000254 0003 02/20/13



James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2013-02-20 : 15:12:59
I couldn't 100% follow the question you are asking. Is what you posted the data as it exists in your table currently? What is the output you wish to see if that is the data in the table?
Go to Top of Page
   

- Advertisement -