Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

between operator for VARCHAR values

te441957asJun 3 2010 — edited Jun 4 2010
Hi there,

I am trying to compare one varchar value between two varchar values which is not working.

for e.g. in my table there are two columns.

FROMpcode(column1)
*****************
L6P 0A1
L6A 0A1

TOpcode(column2)
****************
L7E 5S1
L6A 4R1


the value I want to compare for between FROMpcode and TOpcode is L6S 6B7. here is the query. this is for Canadian postal code comparison.

select * from mytablename where L6S 6B7 between FROMpcode and TOpcode

I can not convert FROMpcode , TOpcode into numbers as they are alphanumeric data.

thanks for your help.

Techie_nas
This post has been answered by Frank Kulash on Jun 4 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 2 2010
Added on Jun 3 2010
13 comments
5,567 views