Thread: Help with Query
View Single Post
Old 09-17-2012, 11:56 PM   PM User | #4
mjstehn
New to the CF scene

 
Join Date: Sep 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
mjstehn is an unknown quantity at this point
I tried this: I use Alias instead of name. This pull the info I am looking for, but does not put Week 2 in the recordset as an additional column.

I was trying to avoid programming on the front end application because I thought it would be easier with a mysql query, but maybe not.


(select m.Alias,m.PickID,m.Week,n.TeamID,n.Name from nflteams as n inner join margin m on m.PickID=n.TeamID where m.Week='1')
union
(select m.Alias,m.PickID,m.Week,n.TeamID,n.Name from nflteams as n inner join margin m on m.PickID=n.TeamID where m.Week='2')
mjstehn is offline   Reply With Quote