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
 SQL Server 2012 Forums
 Transact-SQL (2012)
 How can design a query?
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

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,

Flowing Fount of Yak Knowledge

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

Go to Top of Page

Very Important crosS Applying yaK Herder

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

Go to Top of Page

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.
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