List:General Discussion« Previous MessageNext Message »
From:Steven Buehler Date:August 16 2008 1:52pm
Subject:Multiple Query/Insert help
View as plain text  
I have a query that I just can't seem to get working.

 

insert into games2 (sea_id,date,time,loc_id,hteam,vteam,div_id) (select
'36',game_date,begin_time,loc_id,home_team_id,away_team_id,(select div_id
from team_season where team_id=s1.div_id) from scheduler s1);

 

Of course, I am getting the dreaded "Unknown column 's1.div_id' in 'where
clause'" error message.

I think the statement above shows what I am trying to do better than me
explaining it.  My only real problem is that the div_id needs to be gotten
from the team_season table.

 

Any help would be appreciated

Thanks

Steve


Thread
Multiple Query/Insert helpSteven Buehler16 Aug
  • Re: Multiple Query/Insert helpAndy Shellam16 Aug
    • RE: Multiple Query/Insert helpMartin Gainty16 Aug
      • Re: Multiple Query/Insert helpAndy Shellam16 Aug
        • RE: Multiple Query/Insert helpSteven Buehler16 Aug
          • Re: Multiple Query/Insert helpAndy Shellam16 Aug
      • RE: Multiple Query/Insert helpSteven Buehler16 Aug
        • RE: Multiple Query/Insert helpMartin Gainty16 Aug
    • RE: Multiple Query/Insert helpSteven Buehler16 Aug