Subject | RE: [ib-support] Key of varying length problem |
---|---|
Author | Paul Schmidt |
Post date | 2001-11-12T22:41:25Z |
On 12 Nov 2001, at 13:05, Leyne, Sean wrote:
hoping I could some how join them together, but I guess not....
Paul
Paul Schmidt
Tricat Technologies
paul@...
www.tricattechnologies.com
> Paul,Hmmm... I guess I'll need to do it from the application side, I was
>
> To my way of thinking, the solution is simple.
>
> You always want to search for the postal zones for the postal code
> patterns 'K', 'K9', 'K9J', 'K9J5', 'K9J5A' and 'K9J5A2', and then sort
> them by descending postal postal code patterns.
>
> In Firebird, the SELECT statement would be:
>
> SELECT FIRST 1 POSTAL_ZONE
> FROM POSTAL_CODES_ZONES
> WHERE POSTAL_CODE_PATTERN IN( 'K', 'K9', 'K9J', 'K9J5', 'K9J5A',
> 'K9J5A2')
> order by desc POSTAL_CODE_PATTERN
>
>
> So, if you have zones defined for 'K', 'K9', and 'K9J5', the select
> would return 'K9J5'.
>
hoping I could some how join them together, but I guess not....
Paul
Paul Schmidt
Tricat Technologies
paul@...
www.tricattechnologies.com