First, databases do not have a table type, they are mainly just a
logical grouping of tables. Mixing table types in a database is quite
alright and is what you are supposed to do. I generally use MYISAM,
but if I have a table with lots of activity (inserts, deletes,
selects) or needs
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
Good Morning Mike and Brent
Ive been following and implementing MYSQL tuning suggestions at
http://dev.mysql.com/doc/refman/5.1/en/innodb-tuning.html
I did'nt see any suggestions on converting the entire DB to INNODB
or converting the individual tables to INNODB
Suggestions?
Martin
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
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, game_date as date, begin_time as time, loc_id as loc_id,
home_team_id as hteam, away_team_id as vteam,
Hi Martin,
Good point, I normally do but was just illustrating the join. I would
also normally fully-qualify each column when using table aliases and
multiple tables to avoid disambiguity.
insert into games2 (sea_id,date,time,loc_id,hteam,vteam,div_id)
(
select
'36' as sea_id,
Thank you, but I still get an error and I can't figure it out: Unknown
column 's1.div_id' in 'on clause'
Any other thoughts?
Steve
-Original Message-
From: Andy Shellam [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 16, 2008 9:40 AM
To: Steven Buehler
Cc: mysql@lists.mysql.com
Thank you, but I still get an error and I can't figure it out: Unknown
column 's1.div_id' in 'on clause'
Any other thoughts?
Steve
-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED]
Sent: Saturday, August 16, 2008 9:50 AM
To: Andy Shellam; Steven Buehler
Cc:
Hi Steve-
apparently the column is not defined to that entity
try replacing s1.div_id reference with ts.div_id or even better
team_season.div_id
Martin
__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to
Thank you Martin and Andy for your help in this matter. I redid the queries
taking hints from yours and came up with one that worked. I am not that
great with INNER JOIN's and couldn't get yours to work, even though you did
still say that I needed to tweek it. It would be nice to know the query
See Thread at: http://www.techienuggets.com/Detail?tx=48414 Posted on behalf of
a User
I have a MySQL 5.0 InnoDB database that's about 1 GB in size so it's still
pretty tiny. Is there any performance enhancement maintenance that should be
done on the tables? I do a weekly Optimize through the
Hi Steve,
As Martin pointed out, the column div_id doesn't appear to exist in
your scheduler table. I notice that in your query that now works,
you're linking the field home_team_id to team_id in the team_season
table, not div_id as specified in your original query. Perhaps this
might be
Hello
I am still getting the MySQL Error Number 1045 Access denied error
message when running the adminstrator gui. I attempted to start mysql
from the dos command line via mysql and I am getting the following.
ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using
password:
13 matches
Mail list logo