Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Compound Index
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00044576
Message ID:
00044632
Views:
43
>>>>>>Hi all,
>>>>>>
>>>>>>I have a compound index on the following expression, cnoee+DTOS(dtrans)+cdtrans where cnoee is Employee #, dtrans is date and cdtrans is code. Is there any way I can do descending on dates but acending on the others? Presently I can only think of using a large number to minus DTOS(dtrans). Any other way?
>>>>>>
>>>>>>Thanks.
>>>>>
>>>>>Farouk,
>>>>>
>>>>>Try this. 'index on cnoee+STR({12/31/2099}-dtrans)+cdtrans'. Please let me know if this is successful.
>>>>>
>>>>>Good Luck,
>>>>>
>>>>>Bill Chadbourne
>>>>>wchad@ime.net
>>>>
>>>>Instead of hard coding a date, why not just use the DATE() function? You'll never have a transaction dated tomorrow will you?
>>>>
>>>>If not, use Bill's idea like this:
>>>>
>>>>cnoee+STR(DATE()-dtrans)+cdtrans
>>>>
>>>>PS. hey Bill, with that LOOOOONNGG COBOL thread, don't you think we've learned not to make date related assumtions? (eg)
>>>
>>>i'm sure i won't be around to fix the Y2100 problems...
>>
>>Spoken like a true COBOL programmer ;) I know, I used to be one.
>
>actually, i've never done anything in cobol. in college, most everyone took cobol so they could assure themselves a job when they graduated. i thought i'd rather starve than suffer through that.

The small college I went to only had COBOL, ForTran, and SPSS. Did a lot of COBOL for many years, including 1 app with a single digit numeric year (10 years, not 100). I've seen good and bad COBOL, good and bad Clipper, and so far, only good VFP!!
Dallen K. Delk, Jr.
ddelk@nngov.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform