Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select min(x,y)
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00168438
Message ID:
00168446
Views:
33
>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 ),"

MIN has a special meaning within a SQL Select statement; it's used to select the minimum value taken by an expression within a grouping. In order to select the smaller of two values within a SQL select, try the following instead:

SELECT IIF(N1
>
>anyone seen this???
>
>TIA
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
Previous
Reply
Map
View

Click here to load this message in the networking platform