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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Query find all locations
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

82 Posts

Posted - 02/20/2013 :  13:39:37  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

3873 Posts

Posted - 02/20/2013 :  15:12:59  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000