Re: Using Joins/Unions

2015-08-06 Thread Wm Mussatto
mussa...@csz.com wrote: On Tue, August 4, 2015 11:19, Ryan Coleman wrote: I have been a MySQL user and supporter for over a decade (since 2001) and I am almost ashamed to admit that I haven’t the faintest idea on how to do joins and unions. I have a specific query I would love to run… I have

Re: Using Joins/Unions

2015-08-04 Thread Ryan Coleman
, Ryan Coleman wrote: I have been a MySQL user and supporter for over a decade (since 2001) and I am almost ashamed to admit that I haven’t the faintest idea on how to do joins and unions. I have a specific query I would love to run… I have two tables, one with Unique data (“images”) and one

Using Joins/Unions

2015-08-04 Thread Ryan Coleman
I have been a MySQL user and supporter for over a decade (since 2001) and I am almost ashamed to admit that I haven’t the faintest idea on how to do joins and unions. I have a specific query I would love to run… I have two tables, one with Unique data (“images”) and one with corresponding

Re: Using Joins/Unions

2015-08-04 Thread Wm Mussatto
On Tue, August 4, 2015 11:19, Ryan Coleman wrote: I have been a MySQL user and supporter for over a decade (since 2001) and I am almost ashamed to admit that I haven’t the faintest idea on how to do joins and unions. I have a specific query I would love to run… I have two tables, one

Re: optimizing UNIONs ?

2008-06-11 Thread Lucio Chiappetti
the queries are fast and use the indices on member1 ... membern b) if for maintenance purposes I create unions which concatenate three tables, say member1 (combo1) is union of tab1A tab1B tab1C member2 (combo2) is union of tab2A tab2B tab2C member3 (combo3) is union of tab3A tab3B

optimizing UNIONs ?

2008-06-10 Thread Lucio Chiappetti
(mysql 5.0.27 on SuSE Linux) I recently thought to use UNIONs to allow me to concatenate vertically some database tables with statements like this create or replace view combo as (select * from nov06) union (select *,ra_corr as ra_cor2,dec_corr as dec_cor2 from jul07) union (select

4.1 and unions

2005-08-04 Thread Mike Johnson
Hi all, Is there anyone using version 4.1 that can verify or refute the claim posted at the bottom of the upgrade notes here? http://dev.mysql.com/doc/mysql/en/upgrading-from-4-0.html The user claims that UNION statements with parentheses are broken in 4.1. That is, 'SELECT * FROM table1 UNION

Re: 4.1 and unions

2005-08-04 Thread Jason Pyeron
mysql select * from files where id 10 union (select * from files where id 20 and id 30); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 mysql select * from files where id

Re: 4.1 and unions

2005-08-04 Thread Scott Noyes
UNION is not broken; the syntax in the given comment is incorrect. You can do SELECT * FROM table UNION SELECT * FROM table or (SELECT * FROM table) UNION (SELECT * FROM table) but not SELECT * FROM table UNION (SELECT * FROM table) On 8/4/05, Mike Johnson [EMAIL PROTECTED] wrote: Hi all,

RE: 4.1 and unions

2005-08-04 Thread Mike Johnson
From: Scott Noyes [mailto:[EMAIL PROTECTED] UNION is not broken; the syntax in the given comment is incorrect. You can do SELECT * FROM table UNION SELECT * FROM table or (SELECT * FROM table) UNION (SELECT * FROM table) but not SELECT * FROM table UNION (SELECT * FROM table) Oh,

RE: UNIONS 'Got error 12 from storage engine'

2005-04-21 Thread Mechain Marc
Memory problem. Error 12 = Cannot allocate memory Marc. -Message d'origine- De : Cliff Daniel [mailto:[EMAIL PROTECTED] Envoyé : jeudi 21 avril 2005 07:43 À : mysql@lists.mysql.com Objet : UNIONS 'Got error 12 from storage engine' Have a query that consists of 10 unions

UNIONS 'Got error 12 from storage engine'

2005-04-20 Thread Cliff Daniel
Have a query that consists of 10 unions. For a period of time it will constantly return with an error 12. Moments later it might actually work once or twice. I can find nothing in any logs or whatever. The odd thing is that when it isn't working, simply reducing the unions to 8 or less

unions will full column names won't work in 4.1.7

2004-12-15 Thread Kevin A. Burton
Not sure if this is a bug... probably should be. On 4.1.18 I can run: (SELECT * FROM FOO WHERE ID = 1) UNION (SELECT * FROM FOO WHERE ID = 2) ORDER BY FOO.COL_A Which will work just fine However when I use this query on 4.1.7 I get ERROR 1250 (42000): Table 'ARTICLE' from one of the SELECTs cannot

Re: unions will full column names won't work in 4.1.7

2004-12-15 Thread Paul DuBois
At 16:23 -0800 12/15/04, Kevin A. Burton wrote: Not sure if this is a bug... probably should be. On 4.1.18 I can run: 4.1.18? I assume you mean 4.0.18. Anyway, what you describe is according to the documentation: http://dev.mysql.com/doc/mysql/en/UNION.html (SELECT * FROM FOO WHERE ID = 1) UNION

Re: unions will full column names won't work in 4.1.7

2004-12-15 Thread Rhino
- Original Message - From: Kevin A. Burton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, December 15, 2004 7:23 PM Subject: unions will full column names won't work in 4.1.7 Not sure if this is a bug... probably should be. On 4.1.18 I can run: (SELECT * FROM FOO WHERE

Count Rows within unions

2004-10-15 Thread Martin Rytz
Hi SQL-Cracks How can I count the rows within a select with multiple unions? Count rows with one select is easy: select count(*) from table Count rows over multiple tables is complicated: select name from table1 union select name from table2 union select name from table3 order by name

[jp] Unions in mysql 3.22

2003-11-18 Thread Jorge Paiva \(f2\)
CAN I USE UNION cluse in mysql 3.22?? thank you .. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: [jp] Unions in mysql 3.22

2003-11-18 Thread Barry Byrne
-Original Message- From: Jorge Paiva (f2) [mailto:[EMAIL PROTECTED] Sent: 18 November 2003 15:14 To: [EMAIL PROTECTED] Subject: [jp] Unions in mysql 3.22 CAN I USE UNION cluse in mysql 3.22?? No! UNION is implemented in MySQL 4.0.0 and later. - Barry -- MySQL General

Does mySQL support Pascal/C++ like Unions

2003-11-13 Thread Florian Werner
Hello! Does mySQL support a thing like Pascal/C++ unions for attribute types, i.e. an attribute can be of two types at the same time. Thanks in advance. Florian

Convert with Unions

2003-09-15 Thread Taft, Andy
Hello all, I've tried searching through the lists but haven't been able to find an answer to my problem. If any one can help I would be very grateful, Thanks in advance. Anyway, on to the problem. I have two tables each with field that contains a date in string format 'YYMMDDhhmmss' I want to

Re: Joins and Unions

2003-08-14 Thread Nils Valentin
Hi Kim, just send a reply a minute ago. I got it now. You want to change the way the data is presented at the screen and thats a different issue. You would have to make this in your apllication, not with mysql itself I believe. You basically want the DISTINCT function within the JOINS - but

Re: Joins and Unions

2003-08-14 Thread Kim Kohen
G'day Jim What about this? That's it, thanks! I'll be fiddling a bit to get a few other columns but so far this seems be be what I want. The only book I have which handles Unions is the MySQL Cookbook (Paul Dubois) and the examples didn't include any 'where' clauses so I didn't realise

RE: Joins and Unions

2003-08-14 Thread Jim Smith
Adtrack - holds data about an ads status (but NOT page number) Dummy - holds data about ad position, geometry and page number Stories - holds data about stories and their page number Pages - holds data about pages and their status I want to be able to display a page and all its associated

Joins and Unions

2003-08-14 Thread Kim Kohen
G'day all, I'm pretty new to MySQL and very new to v4. This is probably going to sound strange, but is it possible to create a union using the logic of a join? I have 4 tables and I need to join data from them, but I'd like to display them like a Union. If I do a straight join, I get lots of

Re: Joins and Unions

2003-08-14 Thread daniel
I have also had this trouble before if there are say 5 results from the second table, the first table of results would be duplicated 5 times on a join, i would also like to know how to get around this. G'day all, I'm pretty new to MySQL and very new to v4. This is probably going to sound

Re: Joins and Unions

2003-08-14 Thread Kim Kohen
G'day Nils no offense, but are you actually using the JOIN syntax correctly ? No offence taken - that's why I'm asking the question - I don't know whether I'm approaching this correctly. As I said, I'm new to MySQL ... Could you post your query please ? OK. Adtrack - holds data

Re: Joins and Unions

2003-08-14 Thread daniel
well i'd like to join tables without duplicates, currently i cannot do this unless i select the category table in a second loop to list all the categories for that particular row/record Hi Daniel and Kim, Isn't product_name product_category product_name product_category product_name

Re: Joins and Unions

2003-08-14 Thread Kim Kohen
G'day Nils Well, I can't speak for Daniel, and I'm not really up on his tables, but I'm not using left joins. The situation I have is not one where I need to display items that don't exist from one table or another. The data I get from a basic join is the _data_ I want - I just can't get it to

Re: Joins and Unions

2003-08-14 Thread Hans van Harten
Kim Kohen wrote: Comparing PageAd_num status stories 14312-T1308 Ad Complete 1-marchingband-A33Placed 14312-T1308 Ad Complete 1-jobs-T33 Placed 14312-T1308 Ad Complete 1-illegalbuild-A32 Placed 1

Re: Joins and Unions

2003-08-14 Thread daniel
he is getting the same problem as me as i explained i use joins left join and inner join SELECT * FROM products p LEFT JOIN product_cat_join pcj ON p.productID=pcj.productID LEFT JOIN product_category pc ON pc.catID=pcj.catID; products productID product product_cat_join joinID productID catID

Re: Joins and Unions

2003-08-14 Thread Nils Valentin
Hi Daniel and Kim, Isn't product_name product_category product_name product_category product_name product_category product_name product_category product_name product_category the way its supposed to be ? You are using the LEFT JOIN syntax, but actually using it just as a JOIN. You could

Re: Joins and Unions

2003-08-14 Thread Nils Valentin
Hi Daniel, I am still not sure what exactly you are trying to achieve. If you specify the WHERE condition correctly (or ON or USING for the LEFT JOIN) then there is no duplicate entry. I believe what you are asking has more to do with the way how to present the data in the output. Best

Re: Joins and Unions

2003-08-14 Thread Kim Kohen
G'day Nils just send a reply a minute ago. I got it now. You want to change the way the data is presented at the screen and thats a different issue. You would have to make this in your apllication, not with mysql itself I believe. You basically want the DISTINCT function within the JOINS -

Re: Joins and Unions

2003-08-14 Thread Nils Valentin
Hi Kim, You can create a temporary table by using a table alias. The temporary table will only be accessable by the current connection. Any other connection will not be able to use it. If you want to make a table which can be used by several connections (f.e for a join) you could create a

Re: Joins and Unions

2003-08-14 Thread daniel
how can it be confusing ? nobody ever experienced it before? simply when you join 2 tables together if you get 5 records from the second table the first table will display 5 times aswell Hi Daniel, I am still not sure what exactly you are trying to achieve. If you specify the WHERE

Re: Joins and Unions

2003-08-14 Thread Nils Valentin
Hi Kim, no offense, but are you actually using the JOIN syntax correctly ? Could you post your query please ? My guess is you are doing a JOIN without any set conditions. hat would give you the result as described (which is normal). You would use the WHERE clause or for a LEFT JOIN ...the ON

RE: Unions

2002-06-27 Thread dvorakv
Does anyone else feel that lack of support for subqueries is the number 1 deficiency in MySQL? I'm not sure why support for subqueries is being Actually, I am much more eagerly waiting for views and Unicode support that sub-selects, although of course these would be very nice too. Vaclav

RE: Unions

2002-06-27 Thread Darley, Terry
they neglected one of the most fundamental SQL capabilities. There must be a good reason !!! ??? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 27 June 2002 17:10 To: [EMAIL PROTECTED] Subject: RE: Unions Does anyone else feel that lack of support for subqueries

Re: Unions

2002-06-27 Thread Alexander Barkov
[EMAIL PROTECTED] wrote: Does anyone else feel that lack of support for subqueries is the number 1 deficiency in MySQL? I'm not sure why support for subqueries is being Actually, I am much more eagerly waiting for views and Unicode support that sub-selects, although of course these would

Re: Unions

2002-06-26 Thread Ralf Narozny
Hiho hiho! How about: CREATE TABLE tmp_whatever SELECT list FROM table1... INSER INTO tmp_whatever SELECT list FROM table2... ? Greetings Ralf P.S.: A bit dirty for someone who got used to Oracle ;-) Arul wrote: Hi Can i use Unions in MySQL. If not could anyone comeout with some

RE: Unions

2002-06-26 Thread Charles Ocheret
Subject: Re: Unions But MYSQL4.0 is currently in its Alpha ... Any idea when the Release of 4.0 would be made.. Also any idea about 4.1 Release reg when it would be coz i am eagerly expecting for subqueries in MYSQL -Arul - Original Message - From: Paul DuBois [EMAIL PROTECTED] To: Arul

Re: Unions

2002-06-21 Thread Roger Baklund
* Arul Can i use Unions in MySQL. From version 4 you can: URL: http://www.mysql.com/doc/U/N/UNION.html If not could anyone comeout with some alternates.. The normal workaround is to use temporary tables: create temporary table t1 select ...; insert into t1 select ...; select * from t1

Re: Unions

2002-06-21 Thread Veysel Harun Sahin
Take a look at http://www.mysql.com/doc/;. If you search the keyword union you can get an answer. Arul wrote: Hi Can i use Unions in MySQL. If not could anyone comeout with some alternates.. Regards, -Arul sql

Unions

2002-06-01 Thread Arul
Hi All Is there anything Equivalent in MYSQL for Union in Oracle.. As per my understanding mysql doesnt support unions ...so any suggestions what could be done.. -Arul - Before posting, please check: http://www.mysql.com

Re: Unions

2002-06-01 Thread Victoria Reznichenko
Arul, Saturday, June 01, 2002, 9:26:48 AM, you wrote: A Is there anything Equivalent in MYSQL for Union in Oracle.. A As per my understanding mysql doesnt support unions ...so any suggestions A what could be done.. MySQL supports UNION since 4.0.0. Look at: http://www.mysql.com/doc/U/N

Re: Unions

2002-06-01 Thread Richard Clarke
They are bugged in 4.0.1 (apparently fixed in 4.0.2) so I wouldn't rely on them too much. Richard - Original Message - From: Victoria Reznichenko [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, June 01, 2002 11:33 AM Subject: Re: Unions Arul, Saturday, June 01, 2002, 9:26:48

query unions..

2001-10-30 Thread Michael
I have a table: CREATE TABLE vote_count ( id int(10) DEFAULT '0' NOT NULL auto_increment, imageid int(6) DEFAULT '0' NOT NULL, catid int(4) DEFAULT '0' NOT NULL, count int(6) DEFAULT '0' NOT NULL, PRIMARY KEY (id), INDEX (imageid, catid) ); and am

intersections, unions, and differences

2001-10-20 Thread Michael
I have two lists of queries. One returns the intersection of all the queries within itself.. the actual intersection being done by an external function (which I'd like to change if I can learn how), the other the union of all queries within itself.. again using an external function for the

UNIONS in MySQL 4.0

2001-09-26 Thread Deryck Henson
HI! I am waiting on the official launch of 4 and want to know more about the union tables. Can someone give me the low down on this? I know I will need it (I have to combine 15 tables into one big pile of data) so please help. Thanx! ** - Deryck Henson -

Re: Sorry, no need to answer question about unions...

2001-07-14 Thread Jeremy Zawodny
On Fri, Jul 13, 2001 at 08:44:54PM -0700, William M. Shubert wrote: Ugh, I couldn't find the mailing list archives until I looked at the bottom of my own message that got mailed back to me! I searched, found out about the temporary table workaround for no unions, sorry for bothering you all