Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Index using the QUARTER function on an empty table
Message
 
 
To
24/03/2002 13:30:57
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00636615
Message ID:
00636622
Views:
15
>Creating an index using the QUARTER function on an empty table in VFP 7 generates a "Function argument value, type or count is invalid" error message.
>
>For example:
>CREATE TABLE x (xdate D)
>INDEX ON QUARTER(xdate) TAG qtr

The QUARTER() function generates an error if it's argument is an empty date or Null. Try to use
INDEX ON IIF(Empty(xdate) Or IsNull(xdate), 0, QUARTER(xdate)) TAG qtr
In order to determin the size of the index VFP has to evaluate index expression. VFP uses either the first physical record in the table, if there're any records, or empty record to do that. It's similar to the way VFP determines the size of the fields in the Select Sql.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform