Please start any new threads on our new site at http://forums.sqlteam.com. 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
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 How can design a query?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Erdal
Starting Member

1 Posts

Posted - 03/20/2013 :  05:38:39  Show Profile  Reply with Quote
tblAddress = City
tblMembers = Name,Relation
tblCase = Case_Number



Case_Number Name Relation City

12345 Ahmet PA Istanbul
12345 Fatma WI Ankara
12345 Ali SO Ankara

How can I find if the 'PA' has different ‘City’ then other members?

Thank you,

bandi
Flowing Fount of Yak Knowledge

India
2242 Posts

Posted - 03/20/2013 :  05:50:18  Show Profile  Reply with Quote
Amnot getting your requiremnt...
Can you explain the logic clearly?
Post some sample input data and expected output

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 03/20/2013 :  10:15:52  Show Profile  Reply with Quote
how are the tables related? your table structure doesnt show any columns to relate

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 03/20/2013 :  14:32:35  Show Profile  Reply with Quote
Generally we like to see ddl, sample data and desired output. You might want to take a few minutes and read the articles below for best practices when posting questions. The concepts covered in there will help greatly when you post more in the future.

http://www.sqlservercentral.com/articles/Best+Practices/61537/
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
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.07 seconds. Powered By: Snitz Forums 2000