Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select min(x,y)
Message
De
17/12/1998 12:56:18
 
 
À
17/12/1998 12:49:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00168438
Message ID:
00168578
Vues:
21
>>I am having a problem with a simple select statement and don't know if it is a bug... To verify the simplicity of it, I created a bogus table with two numeric columns N1, N2 both integer.
>>
>>Then I issued
>>
>>select min( N1, N2 ) as tmpfld from tmptable.
>>
>>The error I received was
>>"Function name is missing ),"
>>
>>anyone seen this???
>
>The problem is that the MAX and MIN VFP functions conflict with the SQL ones... I think there is no solution (other than writing an UDF which does the same job) and would like to here about one, if available.

Just write it as an IIF(), a MAX() and MIN() select example:
SELECT IIF(Fld1 > Fld2, Fld1, Fld2) AS MaxFld1Fld2, ;
       IIF(Fld3 > Fld4, Fld4, Fld3) AS MinFld3Fld4 ;
  FROM SomeTable ;
  INTO CURSOR Example
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform