)
AS div_id
FROM scheduler s1
)
Thanks To All
Steve
-Original Message-
From: Andy Shellam [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 16, 2008 10:03 AM
To: Martin Gainty
Cc: Steven Buehler; mysql@lists.mysql.com
Subject: Re: Multiple Query/Insert help
Hi Martin
l
Steve
-Original Message-
From: Andy Shellam [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 16, 2008 10:03 AM
To: Martin Gainty
Cc: Steven Buehler; mysql@lists.mysql.com
Subject: Re: Multiple Query/Insert help
Hi Martin,
Good point, I normally do but was just illustrating the join. I woul
TECTED]; [EMAIL PROTECTED]
> CC: mysql@lists.mysql.com
> Subject: RE: Multiple Query/Insert help
> Date: Sat, 16 Aug 2008 10:10:15 -0500
>
> Thank you, but I still get an error and I can't figure it out: " Unknown
> column 's1.div_id' in 'on clause'
y Shellam; Steven Buehler
Cc: mysql@lists.mysql.com
Subject: RE: Multiple Query/Insert help
the only possible suggestion i have would be to disambiguate the selected
columns with 'as'
insert into games2 (sea_id,date,time,loc_id,hteam,vteam,div_id)
(
select
'36' as sea_id,
n Buehler
Cc: mysql@lists.mysql.com
Subject: Re: Multiple Query/Insert help
Hi Steve,
You're seeing this error because this query:
select div_id
from team_season where team_id=s1.div_id
is being run independently of the rest, so it doesn't know of "s1" in
this context. You would
; CC: mysql@lists.mysql.com
> Subject: Re: Multiple Query/Insert help
>
> Hi Steve,
>
> You're seeing this error because this query:
>
> select div_id
> from team_season where team_id=s1.div_id
>
> is being run independently of the rest, so it doesn't know of &qu
0
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> CC: mysql@lists.mysql.com
> Subject: Re: Multiple Query/Insert help
>
> Hi Steve,
>
> You're seeing this error because this query:
>
> select div_id
> from team_season where team_id=s1.div_id
>
> i
Hi Steve,
You're seeing this error because this query:
select div_id
from team_season where team_id=s1.div_id
is being run independently of the rest, so it doesn't know of "s1" in
this context. You would probably be better with an INNER JOIN here,
something like the following (may need tweak
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 d