>they are all real tables. Here's the actual coding:
>
>cSelectStat = "select "+lcfields +;
> " FROM dride "+;
> " left Join dtpprates On dtpprates.ratespk = dride.ratedtppfk "+;
> " left Join dtpp On dtpp.tpppk = dtpprates.tppfk "+;
> " left Join CRSCHOSEN On CRSCHOSEN.tpppk = dtpp.tpppk "+;
>" left Join dpass On dpass.passpk = dride.passfk "+;
>" left Join CLIENT On CLIENT.personid = dpass.personidfk "+;
>" INTO Cursor crsbilling"
>
>&cSelectStat
>
>Ok, will try this your advice. Thanks.
For debugging in such cases, I usually have
strtofile(cSelectStat, "tmp.prg")
suspend
Then while it's suspended, modi comm tmp and see whether it compiles, and if it runs, where's the error. There's a chance something's wrong with your lcFields. This way you'd see it.