Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table has no index order set.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00811385
Message ID:
00811617
Views:
33
This message has been marked as the solution to the initial question of the thread.
>Hi all!
>
>The following SQL was working fine in the previous version of visual forxpro and when migrate to vfp8.0 result with error "table has no index order set" I check some posting in the previous month and there some people having problem with this in vfp8.0 but nobody look like is getting a correct answer because all the thread are inconclusive.
>
>Please review the followin SQL and give me some clues, BTW the grid that was in the form does not have any relation are plain cursor and there no relation in the code that can make us to think there a previous code that now is causing the problem.
>
>
>select tcern.cjobid, tcern.cprocgrp, tcern.cpaytype, tcern.clvtype, 00000 as recnum, ;
>		padr(iif(left(tcern.cerndesc,1) = "*", ;
>				subs(tcern.cerndesc,2), tcern.cerndesc) ,19) as cerndesc, ;
>		000000.00 as nernqty, 000000.00 as nernamt, ;
>		round(000000.00 * 000000.00,2) as neamount, ;
>		sum(round(tcern.nernqty * tcern.nernamt,2)) as nytd ;
>	from (jckcomb), tcern, tcrec ;
>	where left(tcern.cjobid,10) = &jckcomb..cemplid ;
>		and tcern.cadjnum = 99 and tcern.stat # 'V' ;
>		and tcern.nyear = thisform.payrollyear ;
>		and tcern.ctctrannum not in (select distinct ctctrannum from (ttcrec)) ;
>		and tcrec.ctctrannum = tcern.ctctrannum ;
>		and tcrec.cjobid = tcern.cjobid ;
>		and tcrec.cfrqcode = tcern.cfrqcode ;
>		and tcrec.cadjnum = 99 ;
>		and year(tcrec.dwrntdte) = year(sys_date) ;
>		and tcrec.nyear = thisform.payrollyear ;
>	into table (jckeytdtmp2a) ;
>	group by 1, 2, 3, 4 ;
>	order by 1, 2, 3, 4
>
>
>
>Any help will be very well apreaciate, we are in the process of approve the use of vfp 8.0 and there a couple of issue that was resolve but this one is common in the previous posting but nobody got a correct answer that bring other help to resolve the problem.

Hi Gregorio,

I've seen this error in the following scenario (all must be true):
1) There is a table buffered cursor opened for a table used in the from clause.
2) That cursor has "dirty" record (the record is modified, but not yet saved into buffer).
3) SQL engine creates temporary index for the table to optimize join. Check SYS(3054) output.

To workaround the problem, make sure the dirty record is saved before SQL command is executed or create the index so that SQL engine doesn't need to create temporary index on the fly.

Thanks,
Aleksey.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform