You can do the following instead: select * from account_service_history where CAST(ash_id AS VARCHAR) LIKE '217%';
If this is a common operation, might be better to use VARCHAR instead of INTEGER for your column type. Thanks, James On Sun, Jun 8, 2014 at 10:08 PM, Ramya S <[email protected]> wrote: > Hi, > > > Consider the below query as an example, where the ASH_ID column is INTEGER > type. > > select * from account_service_history where ash_id LIKE '217%'; > > > While firing such a query in phoenix gives a type mismatch error. > > Does phoenix handles type cast of Integer/Double to a string internally? > > > > Thanks > > Ramya.S > > > ________________________________ > > From: James Taylor [mailto:[email protected]] > Sent: Mon 6/9/2014 9:48 AM > To: user > Subject: Re: LIKE operator in Phoenix > > > > Can you give an example of what you mean? LIKE is for strings, but you > can cast an Integer/Double to a string. > > Thanks, > James > > On Sun, Jun 8, 2014 at 9:02 PM, Ramya S <[email protected]> wrote: >> >> >> Does the LIKE operator in phoenix support Integer/Double column values ? >> >> >> >> Thanks >> Ramya.S >> >> > >
