Afficher un message
Vieux 03/10/2007, 13h18   #1
hans christian
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut subquery, alias and derived tables


Hello, I am trying to come up with a way to preform the same query over a
list of tables; of which the tablenames are stored in a ... table.

I have tried numerous ways but unfortunatly the column name is not
expanded or treated as the tablename in the outerquery. So I am trying
now with a subquery only to get caught in the alias mixer. For example:

mysql> SELECT open,high,low,close FROM (SELECT tablename FROM properties);
ERROR 1248 (42000): Every derived table must have its own alias

Is there a way to receive the list of tablenames and preform a subquery
within the same select statement ?

If so I am going to keep searching for the answer using subquery
otherwise I will have to come up with something else.

Thank you for any suggestions.

Cheers,

Hans.
  Réponse avec citation
 
Page generated in 0,06438 seconds with 9 queries