|
|
| Author |
Message |
richie
New User
Joined: 11 Jun 2005 Posts: 24
|
|
|
|
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 |
|
 |
References
|
Posted: Tue Aug 23, 2005 12:01 pm Post subject: Re: QMF |
 |
|
|
 |
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 491
|
|
|
|
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 |
|
 |
richie
New User
Joined: 11 Jun 2005 Posts: 24
|
|
|
|
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 |
|
 |
|
|