Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP MAX() equivalent in SQL
Message
 
 
To
22/09/2010 15:25:30
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01482345
Message ID:
01482347
Views:
77
No and they will not work this way in VFP either. You can use IIF()/ICASE() in VFP and CASE function in SQL Server.


>I have a SQL table with dates in 3 columns. I'm writing a query and I want to get the earliest date from the 3 columns as 'StartDate', and the latest of the dates in the 3 columns as 'EndDate'.
>
>Is there the SQL equivalent to the VFP Min() and MAX() function?
>
>Example:
>
>select min(DateCol1, DateCol2, DateCol3) as StartDate, max(DateCol1, DateCol2, DateCol3) as EndDate from ...
>
>I've been looking, but can't find anything.
>
>Thanks,
>Larry
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform