I need to run the following query:

 SELECT WRK_ImplDisp_1.Livello, WRK_ImplDisp_1.Origine, WRK_ImplDisp.Padre,
 WRK_ImplDisp_1.Figlio, WRK_ImplDisp.QUnit*WRK_ImplDisp_1.QUnit AS Espr1,
 WRK_ImplDisp_1.DaAggregare, -1 AS Espr2
 FROM WRK_ImplDisp INNER JOIN WRK_ImplDisp AS WRK_ImplDisp_1 ON
WRK_ImplDisp.Figlio = WRK_ImplDisp_1.Padre
WHERE (((WRK_ImplDisp_1.Origine)='SA1539T' And
 ((WRK_ImplDisp_1.Origine)=[WRK_ImplDisp].[Origine] Or
 (WRK_ImplDisp_1.Origine) Is Null)) AND ((WRK_ImplDisp.DaAggregare)=True)
AND
((WRK_ImplDisp.Livello)=2));

 but I receive an ODBC error :

 can't reopen table : wrk_ImplDisp1  error #1137

 The table is temporary; the table is created with :
CREATE TEMPORARY TABLE WRK_ImplDisp(IDIMPL INT(11) NOT NULL
 auto_increment,Origine CHAR(19) NOT NULL,Livello smallint NOT NULL, Padre
 char(19) NOT NULL,Figlio char(19) NOT NULL,QUnit REAL NOT NULL,DaAggregare
 tinyint NULL,FlagCompat smallint NULL,Nord int NULL, PRIMARY KEY  (IDIMPL),
 KEY Origine (Origine), KEY Padre (Padre), KEY Figlio (Figlio), KEY
 OrigineLivello (Origine,Livello), KEY DaAggregare (DaAggregare),KEY
 FlagCompact (FlagCompat));

> MySQL 3,23,52 -max
> ODBC 3.51
>
 How I can solve this problem ? Today a query like this  is running  under
 MSAccess97 ; the only difference is about the "temporary", which is
 impossible on MSAccess.
 Tks in advance

 Massimo
> ------------------------------------------------------------
> Massimo Petrini
> c/o Omt spa
> Via Ferrero 67/a
> 10090 Cascine Vica (TO)
> Tel.    +39 011 9505334
> Fax     +39 011 9575474
> E-mail  [EMAIL PROTECTED]
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to