>SELECT DISTINCT ; > p.dist_code AS dist_code, ; > p.work_area AS ward, ; > p.street_ref AS street, ; > p.work_area+"/"+p.street_ref AS wdst, ; > p.propkey AS propkey, ; > p.hyphsuff AS hyphsuff, ; > p.postcode as postcode, ; > s.streetname as streetname,; > ALLTRIM(s.streetname)+IIF(!EMPTY(s.locality),', '+ALLTRIM(s.locality),', ')+ALLTRIM(s.town) AS address, ; > p.propno AS propno,; > c.recordid AS recordid,; > c.pprn AS pprn,; > c.DESC AS DESC,; > c.vcode AS vcode,; > c.Nav as NAV,; > c.RV as RV,; > c.eff_date as Eff_Date,; > c.method as Method,; > p.appealed as Appealed,; > p.cre_matched as Cre_matched,; > c.vsuff as vsuff,; > c.TITLE AS TITLE,; > s.town AS townname,; > ALLTRIM(s.streetname)+ALLTRIM(s.locality)+ALLTRIM(s.town) AS address2,; > RECNO() AS recnotable,; > 999999999 as dynamicbackcolor; > FROM cvs!master c ; > INNER JOIN (property p ; > INNER JOIN street s ON p.street_ref == s.street_ref) ; > ON c.pprn == p.pprn ; > WHERE &lcSQL ; > INTO CURSOR csrCVSMastResults NOFILTER READWRITE > > >SELECT DISTINCT ; > p.dist_code AS dist_code, ; > p.work_area AS ward, ; > p.street_ref AS street, ; > p.work_area+"/"+p.street_ref AS wdst, ; > p.propkey AS propkey, ; > p.hyphsuff AS hyphsuff, ; > p.postcode as postcode, ; > s.streetname as streetname,; > ALLTRIM(s.streetname)+IIF(!EMPTY(s.locality),', '+ALLTRIM(s.locality),', ')+ALLTRIM(s.town) AS address, ; > p.propno AS propno,; > c.recordid AS recordid,; > c.pprn AS pprn,; > c.DESC AS DESC,; > c.vcode AS vcode,; > c.Nav as NAV,; > c.RV as RV,; > c.eff_date as Eff_Date,; > c.method as Method,; > p.appealed as Appealed,; > p.cre_matched as Cre_matched,; > c.vsuff as vsuff,; > c.TITLE AS TITLE,; > s.town AS townname,; > ALLTRIM(s.streetname)+ALLTRIM(s.locality)+ALLTRIM(s.town) AS address2,; > RECNO() AS recnotable,; > 999999999 as dynamicbackcolor; > FROM cvs!PENDING c ; > INNER JOIN (property p ; > INNER JOIN street s ON p.street_ref == s.street_ref) ; > ON c.pprn == p.pprn ; > WHERE &lcSQL ; > INTO CURSOR csrCVSPendresults NOFILTER READWRITE > >SELECT DISTINCT ; > p.dist_code AS dist_code, ; > p.work_area AS ward, ; > p.street_ref AS street, ; > p.work_area+"/"+p.street_ref AS wdst, ; > p.propkey AS propkey, ; > p.hyphsuff AS hyphsuff, ; > p.postcode as postcode, ; > s.streetname as streetname,; > ALLTRIM(s.streetname)+IIF(!EMPTY(s.locality),', '+ALLTRIM(s.locality),', ')+ALLTRIM(s.town) AS address, ; > p.propno AS propno,; > c.recordid AS recordid,; > c.pprn AS pprn,; > c.DESC AS DESC,; > c.vcode AS vcode,; > c.Nav as NAV,; > c.RV as RV,; > c.eff_date as Eff_Date,; > c.method as Method,; > p.appealed as Appealed,; > p.cre_matched as Cre_matched,; > c.vsuff as vsuff,; > c.TITLE AS TITLE,; > s.town AS townname,; > ALLTRIM(s.streetname)+ALLTRIM(s.locality)+ALLTRIM(s.town) AS address2,; > RECNO() AS recnotable,; > 999999999 as dynamicbackcolor; > FROM cvs!History c ; > INNER JOIN (property p ; > INNER JOIN street s ON p.street_ref == s.street_ref) ; > ON c.pprn == p.pprn ; > WHERE &lcSQL ; > INTO CURSOR csrCVSHistresults NOFILTER READWRITE > >SELECT * FROM csrCVSMastResults ; >UNION ALL; >Select * FROM csrCVSPendresults ; >UNION ALL ; >SELECT * FROM csrCVSHistresults ; >INTO CURSOR csrCVSResults ORDER BY 1,2,3,5,6 > >