Joins have always confused the heck out of me and how to best use them (Or even use them sometimes)
Consider 2 tables like this in the same database
SharedKey is a numeric
All the blahs are strings
MyDate is a date
As we can see it has a shared key. Great, the 2 tables can be searched across giving us merged results between the 2 tables.
Now a client wants merged results from both tables where MyDate from table1 is > 1/1/2000 and < 1/1/2001 and where Blah4 from table2 = "fred"
This from what I can see would be a great use of a join.
So from what I can see we would do a select * from Table1 where mydate > '1/1/2000' and mydate < '1/1/2001' as first_table
and do a select * from Table2 where Blah4 = "fred" as second_table,
then join the results where first_table.SharedKey = second_table.SharedKey
Now just so you know, I'll need abit of help understanding the join so that way I'll not need to keep on scratching my head over them all the time.
Thanks in advance,