Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Expression sql column not found
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01364005
Message ID:
01364038
Vues:
15
>Move it into HAVING clause
>
> WHERE ... 
> HAVING sugamt > 0 ;
> ORDER BY ...
>
>
>>I am trying to retreive all values that return a non-zero from a expression column, but I'm getting syntax error saying:
>>
>>
>>SQL:  Column 'SUGAMT' is not found.
>>
>>
>>here is my query:
>>
>>
>>SELECT Products.p_productname, Products.p_itemcode,;
>>  Products.p_unitsinstock, Products.p_unitsonorder,;
>>  Products.p_totqtyperunit, Products.p_qtyperunit, Products.p_max,;
>>  Products.p_min,;
>>  IIF(Products.p_unitsinstock<=Products.p_min,Products.p_max-Products.p_min,0000000) as sugamt;				  
>> FROM ;
>>     warehouse!products;
>> WHERE  Products.p_itemcode BETWEEN ?lc_bitem AND ?lc_eitem AND Products.p_listactive = .T. and sugamt > 0;
>> order BY Products.p_productname INTO CURSOR prodrep
>>
>>
>>I only want to retrieve values that have sugamt greater than 0. Is a derived column not allow in the where column?


Thanks again Sergey
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform