Hi,

I'm having a problem with subqueries in MySQL 4.1.14 running on Fedore
core 3.

mysql> create table day_6_12_2005 (f1 int(1), f2 char(4));
Query OK, 0 rows affected (0.04 sec)

mysql> insert into day_6_12_2005 values(1,'test');
Query OK, 1 row affected (0.00 sec)

mysql> select * from (select date_format(now(),'day_%e_%c_%Y')) as t1;
+-----------------------------------+
| date_format(now(),'day_%e_%c_%Y') |
+-----------------------------------+
| day_6_12_2005                     |
+-----------------------------------+
1 row in set (0.04 sec)

mysql> select f1,f2 from (select date_format(now(),'day_%e_%c_%Y')) as
t1;
ERROR 1054 (42S22): Unknown column 'f1' in 'field list'

Any one know what's going on?  According to the docs, this should work
fine...

Any pointers or ideas will be much appreciated...

Cheers,

Andrew

SQL, query


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to