IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

is that possible to use characters in Between clause


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
banuradha

New User


Joined: 20 Dec 2006
Posts: 19
Location: India

PostPosted: Thu Feb 15, 2007 4:24 pm
Reply with quote

Hi all,

Like we use

SELECT dept_no from department
where dept_no between 5 and 10

is that possible to check the character using between
something like the one below.

SELECT name from department
where name between like(A%) and like(E%)
Thanks,
Banu
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1209
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 4:33 pm
Reply with quote

HI Banu,

You will get

Quote:
SQLCODE = -104, ERROR: ILLEGAL SYMBOL "%". SOME SYMBOLS THAT MIGHT BE
LEGAL ARE: ) ,
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1209
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 4:40 pm
Reply with quote

Hi Banu,

I think u can use

Code:
SELECT name from department
where name between 'A' and 'E'
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Identify and write records containing... SYNCSORT 11
No new posts IBM HPU 5.2 - Converting EBCDIC Chara... DB2 0
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:


Back to Top