Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

QMF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
richie

New User


Joined: 11 Jun 2005
Posts: 24

PostPosted: Tue Aug 23, 2005 12:01 pm    Post subject: QMF
Reply with quote

Hi,

I am writing this query to retrieve the records from a table.

item_id char (9)
item_typ char (2)

select * from table1 where item_typ = 'KC' and item_id between '017897600' and '018263784'

While retieving the data its not giving me the recs as per second condition on item_id ex it gives item_id 005513510 also in the fetched recs.

Please tell me what could be the problem.
does between work on char datatype or do i need to convert the item_id to numeic first?
thanks a lot!!
Back to top
View user's profile Send private message

Rupesh.Kothari

Member of the Month


Joined: 27 Apr 2005
Posts: 464

PostPosted: Tue Aug 23, 2005 12:17 pm    Post subject: Re: QMF
Reply with quote

Hi Richie,

Generally we use between for Numeric data.

Try to change item_id to numeric and execute your query. it will give you required results.


Regards
Rupesh
Back to top
View user's profile Send private message
richie

New User


Joined: 11 Jun 2005
Posts: 24

PostPosted: Tue Aug 23, 2005 12:28 pm    Post subject: Re: QMF
Reply with quote

Hi Rupesh,

Thanks for your reply.

Please tell me how do we convert char to Num as TO_NUM function is not working here.Please let me know i we ahve anyother fuction for character to numeric conversion.

Thanks,
richie
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:



Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us