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

 All Forums
 General SQL Server Forums
 Database Design and Application Architecture
 Joining multiple tables in the same query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 03/10/2014 :  04:31:49  Show Profile  Reply with Quote
I have 4 tables that i need to join to return results for an sms gateway. The columns that i need to be output are tblmembers.name and tblmembers.number.

I need to be able to change the following conditions according to my application but the structure should stay the same on the query, the columns that i need to be able to filter by are: tblmembers.sms, tblmembers.country_zone_id, tblmembers.country_id, tblmembers.birthdate (between x any y), tblmembers.gender, tblmembers.campid, tblmembers.poe, the second table is tblmembertiers.status (this needs to be the newest entry), the third table is accounttrans.amount (i need to be able to calculate average earn/redeem and even select the top x members), accounttrans.mercantid(need to return members who have been to a store x or more times. the last table is accounts.balance (need to be able to return members with an average balance of x)

So basically i need a query where i can sqecify all the values for the given columns and have the valid results returned.

Thanks for the help!
  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