Home » SQL & PL/SQL » SQL & PL/SQL » how to use between
how to use between [message #227126] Tue, 27 March 2007 06:59 Go to next message
bhoite_amol83
Messages: 110
Registered: June 2005
Location: Pune
Senior Member
Hi All
I have a table named Zipcode.
It has columns Column

ZIPCODE_SEQ,
COUNTRY_CODE,
ZIPCODE_FROM,
ZIPCODE_TILL,
DESCRIPTION

I want to check the user defined zip code is within the range ZIPCODE_FROM,
ZIPCODE_TILL,

Can anyone tell me how can i do it.

Thnaks
Re: how to use between [message #227128 is a reply to message #227126] Tue, 27 March 2007 07:01 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
check the oracle reference manual.
Re: how to use between [message #227239 is a reply to message #227126] Tue, 27 March 2007 11:26 Go to previous messageGo to next message
Ronald Beck
Messages: 121
Registered: February 2003
Senior Member
You don't provide enough information about your table. A lot depends on whether you're using text or numbers. Remember, "09357" (character) is different than 9357 (number). It will make a difference.
Re: how to use between [message #227240 is a reply to message #227126] Tue, 27 March 2007 11:34 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
> Remember, "09357" (character) is different than 9357 (number).
Except Oracle uses single quote marks; not double quote marks to delimit character string.
Re: how to use between [message #227242 is a reply to message #227240] Tue, 27 March 2007 12:19 Go to previous messageGo to next message
Ronald Beck
Messages: 121
Registered: February 2003
Senior Member
Regardless of whether I typed a " or a ', the fact remains that you can't tell how to compare the data if you don't know the type. '9723' is different than 9723. One is a character string and one is a number. TYPE makes a difference when you're comparing values. And you can't provide a valid answer to the original question if you don't know the field types.
Re: how to use between [message #227388 is a reply to message #227242] Wed, 28 March 2007 02:26 Go to previous message
muzahid
Messages: 281
Registered: September 2004
Location: Dhaka, Bangladesh
Senior Member
check the weblink

http://www.techonthenet.com/oracle/check.php
Previous Topic: No logging?
Next Topic: TYPICAL QUERY..Experts ??
Goto Forum:
  


Current Time: Wed Dec 07 10:54:04 CST 2016

Total time taken to generate the page: 0.12984 seconds