Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select - SQL / Index and ICE!
Message
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00532133
Message ID:
00532143
Views:
11
Terry,

The letters a-j are reserved words in foxpro and reference the work areas from 1 to 10. It confuses foxpro totally. I recomend to use table names not aliases in select.
SELECT defendan.def_id, defendan.casenumber, ;
		defendan.vlastname, defendan.vfirstname, ;
		defendan.arrestnum, defendan.codenum, ;
		defendan.arrestdate, defendan.arresttime, ;
		person.lname, person.fname ;
FROM defendan, Person ;
WHERE defendan.arrestnum = person.arrestnum AND defendan.casenumber = m.case ;
ORDER BY lname, fname ;
INTO CURSOR lctest
>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.
>
>I have tried everything to clear up the ICE. My Config.sys has RESOURCE=OFF as the first line. I have re-created the indexes on the tables. I have deleted the Foxuser files. I have deleted the .tmp files. I have defragged the hard drives. etc. etc. etc.
>
>If there is no way to fix the SQL statement to get rid of the ICE, is there an easy way to order the cursor after the SQL has run?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform