Post by mcnewsxpi have a main student table. i need to join to an insurance table where
the insurance type is not type 8. no problem. i need to join to two
other tables that are one to many. each of these tables has a date
column i can use to get the most current record. i figured out how to
get one of them, but getting both is getting murky for me. i could use
some help.
For this kind of problem, I recommend that you incldue:
1) CREATE TABLE statements for your tables (preferably simplified to
what is pertinent for the problem.)
2) INSERT statements with sample data.
3) The desired result given the sample.
4) A short description of the business rules.
5) Which version of SQL Server you are using.
I like to add that you are under no obligation to provide all this
information, but the more accurate your description is, the more likely
that you get a usable answer. With the tiny amount of give above, I am
not going to try even a wild guess.
--
Erland Sommarskog, SQL Server MVP, ***@sommarskog.se
Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx