Re: Using Joins/Unions

2015-08-06 Thread Wm Mussatto
9 > >> On Aug 4, 2015, at 17:33, Wm Mussatto 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

Re: Using Joins/Unions

2015-08-04 Thread Ryan Coleman
: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… >> >>

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

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: optimizing UNIONs ?

2008-06-11 Thread Lucio Chiappetti
where the "member" tables are real tables 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 tab2

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

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: 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 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

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: UNIONS & 'Got error 12 from storage engine'

2005-04-20 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 o

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

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

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 (

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

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

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 lat

[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]

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 g

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 c

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 cond

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 HEAP

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 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 rega

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 c

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 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 > Plac

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 di

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_na

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 a

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 mul

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 assoc

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&

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 on

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: 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

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 subquerie

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 Dv

RE: Unions

2002-06-26 Thread Charles Ocheret
aul DuBois 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" &l

Re: Unions

2002-06-26 Thread Ralf Narozny
Hiho hiho! How about: CREATE TABLE tmp_whatever SELECT FROM table1... INSER INTO tmp_whatever SELECT 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 som

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.. >

Re: Unions

2002-06-21 Thread Roger Baklund
* Arul > Can i use Unions in MySQL. >From version 4 you can: 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 ...; sele

Unions

2002-06-21 Thread Arul
Hi Can i use Unions in MySQL. If not could anyone comeout with some alternates.. Regards, -Arul sql, - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

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 > A

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.

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: query unions..

2001-10-31 Thread Michael
Since I don't think anyone answered my question I did find a combination of queries that seemed to do the trick. In case anyone else might need to know this is what I did.. please correct me if you see anything I did wrong.. CREATE TEMPORARY TABLE tmp1 SELECT vc0.imageid FROM vote_count AS vc0 LE

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 union..

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 - http://www.comp-u-exchange.

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 >

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

2001-07-13 Thread William M. Shubert
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 with a question that had been answered before. I'm still eager