SELECT Sales1.* ; FROM Sales1 ; INNER JOIN selsal on Sales1.BillNo = selsal.billno ; INNER JOIN pcode1 on Sales1.pcode = pcode1.pcode ; INNER JOIN igroup on pcode.igroup = igroup.igroup ; WHERE selsa.sels = "Y" ; AND igroup.selg = "Y" ; AND between(sales1.billdate,mydate,Mydate1) ; INTO TABLE tsales1please help me for below code in select-sql :
mydate=ctod("01/01/2006") mydate1=ctod("28/02/2006") sele a use igroup inde on igroup for selg='Y' to selig igcond='.t.' sele igroup goto top if !eof() igcond="found('igroup')" endif sele b use pcode1 set rela to igroup into igroup addi inde on pcode for &igcond to selpc pcond='.t.' sele pcode1 goto top if !eof() pcond="found('pcode1')" endif sele c use selsal inde on billno for sels='Y' to selbill selcond='.t.' sele selsal goto top if !eof() slecond="found('selsal')" endif use sales1 set order to billdate set rela to billno into selsal addi set rela to pcode into pcode1 addi seek mydate copy to tsales1 for &selcond and &pcond WHILE BILLDATE<=MYDATE1 SELE F USE TSALES1please help me.