Re: [Q] Select Problem
Posted in 1998
Pawel Stepniowski wrote:
>
> Hi,
>
> anyone know , how to get similar functionality for numerical as LIKE
> does for string.
> I am developing program which has common frame to select records ,
> restricted by user input . When user types in 'A*' all records begining
> with A will be displayed.
> But what if field is not of text type ? How to display records begining
> with 5 ?
>
> please help
>
> --
> Pawel Stepniowski
> mailto:stepniow@quantum.pl
> internet: http://www.quantum.de/~pawel
I agree with Mark, but if you must do it, this might work: write a SPL
function to convert the numeric column to text and then do the LIKE on
that. It would work like this:
select * from mytable where num_to_text(mycolumn) like "5%"
Check out the IIUG FTP lists as the Oracle functions may do thisconversion for you.
I presume speed is immaterial here as this will be sloooow.
--
Peter Lancashire
Information Systems Specialist, Bayer plc
Eastern Way, Bury St Edmunds, Suffolk, IP32 7AH, UK
Tel: +44-1635-562258, Fax: +44-1635-562281
Mail: Peter.Lancashire.PL1@bayer.co.uk
---
My Internet plumbing does not allow me to mail and post news together.
Sorry.
All opinions are my own and not those of Bayer plc.
---
Join Infuse, the UK Informix User Group at http://www.infuse.co.uk/