CK,
Thanks again. This worked perfect.
And thank Abev. I futz with the While Loop for... well...a while and couldn't get it. But I'm sure it would have eventually.
I appreciate both your time.
-michael
User Profile
Collapse
-
-
Abev,
Thanks so much. I'll try it. It looks like it might work, but since they want the search to go both up and down, maybe I'll need to set a second searchzip. Something like this:
...Code:WHILE (SELECT REP FROM REPS WHERE REPZIP = @SEARCHEDZIP OR REPZIP = @SEARCHEDZIP2) BEGIN IF (SELECT COUNT(REP) FROM REPS WHERE REPZIP = @SEARCHEDZIP) > 0 || (SELECT COUNT(REP) FROM REPS WHERE REPZIP = @SEARCHEDZIP2)Leave a comment:
-
CK,
Thanks so much. Yes, you're understanding me and this makes sense.I think your answer gets me halfway there. But they want the search to expand both up and down. Meaning if we start with 00608 but that returns nothing, they want to go to 00609, then DOWN to 00607, then try 00610, then 00606, so it's an ever-expanding set away from the original.
Our VPN is down, but I'll fiddle with this when I get in in the morning. ...Leave a comment:
No activity results to display
Show More
Leave a comment: