lcIssue = .ThisIssue select BatchCntrl lcOldOrder = order() set order to DsIDWeek * BINTOC(dsid)+extryear+extrweek lcFor = iif(vartype(m.tnDsID)="N",; [for bintoc(DsID)+extryear+extrweek=bintoc(tnDsID)+lcIssue], ; [for State+ExtrYear+ExtrWeek=']+ m.lcStateWeek+[']) scan &lcForThis doesn't seem to work. Originally I have
[for bintoc(DsID)+extryear+extrweek=']+bintoc(tnDsID)+lcIssue+['], ;
which gave me error on SCAN line. lcFor contains some symbols, which probably & can not recognize.
What can I do here? Change it to separatly use DSID and ExtrYear, ExtrWeek (e.g. don't use DsIDWeek index). I probably can add two more indexes in my table to still use Rushmore optimization.
Still, I'm cursious, is there a way around my problem?