SELECT contract.fy,contract.disability,contract.analyst,contract.pcode,typename,;
contract.contract,contconc,agencies.agency,;
contract.ofac,contract.ounit,contract.vProgram,;
programs.program,progbud.fsname,;
SUBSTR(agencies.agency,1,75) as fund_name,;
ALLTRIM(progbud.fscode)+ALLTRIM(progbud.fsndx) as fund_type,;
' ' as fundkey,progbud.fscode,progbud.fsndx,;
progbud.cityndx,progbud.fund_amt as fund_amt,;
contract.ps_ltot,contract.otps_tot,contract.gross,;
contract.budgaccr,contract.adjgross,contract.income,;
contract.netamt,contract.agencont,contract.adjnet,;
contract.fringe_amt,contract.equip_amt,;
contract.aadmin_amt,contract.pffed,contract.pfcity,;
contract.pfstate,' ' as fsc,;
contract.pend,contract.progid,contract.units, ;
losDummy.julserv as served,losDummy.julpct as mo_los,;
losDummy.julcum as ytd_los,'x ' as reported, ;
losDummy.julact as actual,losDummy.yearcom,;
.f. as switched,contract.bud_flag, ;
.f. as los07, .f. as los08,contract.comments ;
FROM s:\mhshare\vfp7share\vfp7dev\data\contractfiles07\progbud,;
contract,agencies,statecodes,programs,losDummy ;
WHERE EMPTY(contract.comments) AND contract.fy='2007' AND contract.bud_flag ;
AND progbud.progid=contract.progid ;
AND agencies.agcycode=contract.agcycode ;
AND statecodes.pcode=contract.pcode ;
AND statecodes.disability=contract.disability ;
AND programs.progid=contract.progid ;
AND EMPTY(losDummy.pcode) ;
INTO dbf smog ;
ORDER BY contract.fy,contract.disability,contract.pcode,;
contract.contract,agencies.agency,contract.progid,progbud.fscode,;
progbud.fsndx,progbud.cityndx;
GROUP BY contract.fy,contract.disability,contract.pcode,;
contract.contract,agencies.agency,contract.progid,progbud.fscode,;
progbud.fsndx,progbud.cityndx