View previous topic :: View next topic
|
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 |
|
|
Rupesh.Kothari
Member of the Month
Joined: 27 Apr 2005 Posts: 463
|
|
|
|
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 |
|
|
|