>I have 4 tables that I need to join into one big table for export purposes and historic value.
>
>Request
>Recievable
>Payor
>Name
>
>Recievable is the main table which can have many records attached to it from Request. Payor and Name tables are one to one connection to Recievable table.
>
>Can anyone suggest a way to speed this up?
>
>Thanks,
>Beth
>
Beth,
I didn't examine the whole code, but the very top could be changed this way:
>
>SELECT * FROM payor WHERE payor_id = lcid ;
> INTO CURSOR ctemp nofilter
>lncount1 = _TALLY
>IF lncount1 > 0
> lncount = 0
> SELECT lastname, firstname, midname, edulogid FROM name1 ;
inner join ctemp on Name1.edulogid = cTemp.name_Id
> INTO CURSOR cname1 nofilter
> lncount = _TALLY
>ENDIF
If it's not broken, fix it until it is.
My Blog