Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Selecting data from tables with same column

Author  Topic 

BusteR
Starting Member

17 Posts

Posted - 2004-05-19 : 13:46:47
Hi

I really do know that making tables with same named columns is a wrong thing, but it's mainly because of a poor front-end to the database.
Second thing is, that i have to use mysql 3.x [i know that it suxx bigtime because of lack of primary things in sql].
And know... i have 20 tables, diffrently named, but with same structure:
key, name, date.
I want to search all the columns using select name, date from table_name where name like '%something%'.
Best thing to do would be to create a view, and make a quary with it. But unfortunately in mysql 3.x there are no views!
So i have to ask You, sql masters, is there any way to do it with one select statement?
If there will be no such option, i will have to rename all the columns in all tables, but it will be a pain in the ass to change anything in the frontend, which is used to send queries to database.

Best regards

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-19 : 13:48:43
This is a SQL Server forum. You can post your mysql question here (Other Topics):

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=7

Or try dbforums.com since it has a mysql forum:

http://www.dbforums.com/f5

Tara
Go to Top of Page

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-05-19 : 13:49:37
Does mySQL support UNION?
Go to Top of Page

BusteR
Starting Member

17 Posts

Posted - 2004-05-19 : 13:55:07
mysql in 3.x version does not support union.

tduggan: sorry, i just put it in wrong place... i will try to move it, if there is any moderator in here, it would be nic if he could help me with it.

EDIT: i can't move the topic to other forums :/
Can anyone do it for me?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-05-19 : 14:00:30
No problem. I don't think that there are very many mysql people here.

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-05-19 : 14:08:10
[thud]
quote:

mysql in 3.x version does not support union.


[/thud]

You're kidding...right?

Or check out here.....

http://www.dbforums.com/f5



Brett

8-)
Go to Top of Page

BusteR
Starting Member

17 Posts

Posted - 2004-05-19 : 14:13:51
quote:
Originally posted by X002548

[thud]
quote:

mysql in 3.x version does not support union.


[/thud]

You're kidding...right?



http://dev.mysql.com/doc/mysql/en/UNION.html
No I'm not kidding.

quote:

UNION is available from MySQL 4.0.0 on.



Best regards.
Thanx for moving and thanx for link :)
Go to Top of Page
   

- Advertisement -