SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

wsilage
Yak Posting Veteran

USA
76 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

3741 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  
 New 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.06 seconds. Powered By: Snitz Forums 2000