Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select - SQL / Index and ICE!
Message
 
To
19/07/2001 12:10:21
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00532133
Message ID:
00533404
Views:
9
Hi Dragan,

Your solution works beautifully.

Thanks,

TFISHER

>>Hello,
>>
>>Can anyone tell me how to better write the following SELECT:
>>
>>SELECT a.def_id, a.casenumber, a.vlastname, a.vfirstname, a.arrestnum, a.codenum, ;
>>a.arrestdate, a.arresttime, b.lname, b.fname ;
>>FROM defendan a, Person_a b ;
>>WHERE a.arrestnum = b.arrestnum AND a.casenumber = m.case ;
>>ORDER BY lname, fname ;
>>INTO CURSOR lctest
>>
>>This is in a FPW 2.6 application. It works fine on some machines, but creates an ICE on other machines. On some machines, it works fine for a while, then creates an ICE. Once it creates an ICE, I can not get the SQL to work again without getting the ICE.
>>
>>I have traced the problem to the ORDER BY clause. If I remove the ORDER BY, the ICE does not occur.
>
>So split it into two:
>
>
SELECT a.def_id, a.casenumber, a.vlastname, a.vfirstname, a.arrestnum, a.codenum, ;
>a.arrestdate, a.arresttime, b.lname, b.fname ;
>FROM defendan a, Person_a b ;
>WHERE a.arrestnum = b.arrestnum AND a.casenumber = m.case ;
>INTO CURSOR lctest1
>
>SELECT * from lctest1 into curs lctest ;
>ORDER BY lname, fname
>If this is still too heavy, you can first select from defendan ... where a.casenumber = m.case into a first cursor, then join the results with the person_a, then order it in the third SQL. A spoonful at a time.
Thanks,

TFISHER
Previous
Reply
Map
View

Click here to load this message in the networking platform