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
, 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
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
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
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
(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
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
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
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,
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,
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
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
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
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
- 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
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
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]
-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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 -
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
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
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
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
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
[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
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
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
* 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
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
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
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
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
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
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
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
-
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
50 matches
Mail list logo