I sat in a dentist chair for 5 hours and I'm not all here, and I cannot
figure out the following:

 

I've imported a Zip+4.cvs sales tax file supplied by our Washington State
Dept of Revenue that has some missing Plus4 data due to new sub-developments
and new construction and PO Boxes

 

I can SET vLocalCode as a VARIABLE where there is a valid row, but when the
valid USPS Plus4 is not in a Dept of Rev Plus4 range we of course get a "NO
ROWS FOUND" 

 

I now need to find the row where the zipcode is the same and the starting
Plus4 range is '0000'.  I need to reset the vThisPlus4 variable to '0000'
and then make a second go at finding the valid default row 

 

EXAMPLE: Any Plus4 up to 9734 will create a "NO ROWS FOUND"

 

Sample data as supplied:

ZIP   PLUS4_LOW  PLUS4_HIGH   CODE STATE LOCAL TOT_RATE  EFF_START  EFF_END

----- ---------  ----------   ---- ----- ----- --------  ----------
----------

98537    0000      0000       1400 0.065 0.018   0.083    07/01/08
09/30/08

98537    9735      9745       2500 0.065 0.013   0.078    07/01/08
09/30/08

98537    9747      9747       1400 0.065 0.018   0.083    07/01/08
09/30/08

98537    9801      9801       1402 0.065 0.018   0.083    07/01/08
09/30/08

 

 

*(Lots of Rbase for DOS code above)

LABEL BadPlus4

CLEAR V vLocalCode

SET   V vLocalCode TEXT = NULL

SET V vLocalCode = LocalCode IN Quarter_NOW WHERE ZipCode = .vThisZcode AND
+

.vThisPlus4 BETWEEN Start4 AND End4

*(Here is where I need to check if NO row was found)

IF    <something>   THEN

     SET V vThisPlus4 = '0000'

     GOTO BadPlus4

ENDIF

SET V vTotalTax  = TotalTax  IN Quarter_NOW WHERE ZipCode = .vThisZcode AND
+

.vThisPlus4 BETWEEN Start4 AND End4

 

My hope is that I awake refreshed and you folks who are in earlier time
zones and with all cylinders firing will have supplied the missing line(s)
of code or have told me where to look for the examples.

 

Thanks in advance.

Ned

 

Reply via email to