What version of MySQL are you using?
Regards,
A$
On Saturday, August 2, 2003, at 11:45 PM, Pascal Délisle wrote:
Hi!
I try to figure out how to use a nested "SELECT" statement after the
"IN" predicate. For example, when I try this code, it doesn't return
anything although it should:
SELECT b
In the last episode (Aug 03), Pascal Dlisle said:
> Finally, I solved my problem by creating a temporary table that holds
> the result of the subquery. So, it looks like this:
...
> The only problem I see is when there are concurrent access to the
> table "livreTemp", e.g. when there are multiple
= auteur.IDAuteur
and livre.IDLivre = livreEcritPar.IDLivre;
++-+--+
| title | Prenom | Nom |
+------------+-----+--+
| howto: MySQL | Matthew | Gold |
| howto: PHP | Matthew | Gold |
| History of Tayport | Matthew | Gold |
+---
ay, August 03, 2003 1:02 PM
Subject: Re: Nested SELECT statements problem
Finally, I solved my problem by creating a temporary table that holds
the result of the subquery. So, it looks like this:
CREATE TABLE livreTemp (IDLivre int(11));
INSERT INTO livreTemp (IDLivre) SELECT book.IDLivre
FROM li
- Original Message -
From: "Pascal Délisle" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 03, 2003 1:02 PM
Subject: Re: Nested SELECT statements problem
> Finally, I solved my problem by creating a temporary table that holds
> the result of
Finally, I solved my problem by creating a temporary table that holds
the result of the subquery. So, it looks like this:
CREATE TABLE livreTemp (IDLivre int(11));
INSERT INTO livreTemp (IDLivre) SELECT book.IDLivre
FROM livre book, livreEcritPar ecr, auteur aut WHERE aut.Prenom like
'%$firstNa
Thanks for your input!
First, I removed the quotation marks into the sub-query in order to fix
syntax. Then, I tried to use different alliases from the main query.
However, this doesn't work. I mean that mySQL return a syntax error.
I checked the server version and it is 3.23.56. As someon
One problem is that you have quoted your "sub-query", which makes it to return a
constant string.
Another problem I saw in your code is that you used the same aliases for tables
in the query and in the sub-query. In such case, the SQL parser would take all
of them to refer to the same table, prob
Dan Nelson wrote:
In the last episode (Aug 02), Pascal Dlisle said:
I try to figure out how to use a nested "SELECT" statement after the
"IN" predicate. For example, when I try this code, it doesn't return
anything although it should:
SELECT book.IDLivre, aut.Prenom, aut.Nom FROM livre book,
In the last episode (Aug 02), Pascal Dlisle said:
> I try to figure out how to use a nested "SELECT" statement after the
> "IN" predicate. For example, when I try this code, it doesn't return
> anything although it should:
>
> SELECT book.IDLivre, aut.Prenom, aut.Nom FROM livre book,
> livreEcrit
10 matches
Mail list logo