Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
is that possible to use characters in Between clause

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: is that possible to use characters in Between clause
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: 1188
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 4:33 pm    Post subject:
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: 1188
Location: Bangalore,India

PostPosted: Thu Feb 15, 2007 4:40 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Date in where clause - Windows Karthikeyan Subbarayan DB2 9 Wed Nov 15, 2017 9:07 pm
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Binary to display characters Roy Ware SYNCSORT 3 Tue Sep 19, 2017 8:46 pm
No new posts Remove junk values in a file and rite... KP1125 DFSORT/ICETOOL 2 Wed Jan 25, 2017 9:58 pm
No new posts Need help on SQL Dynamic WHERE Clause subratarec DB2 12 Sat Jul 16, 2016 3:11 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us