Re: [SQL] Retype

2003-06-10 Thread Richard Huxton
On Monday 09 Jun 2003 10:24 am, Rado Petrik wrote: > I have query " SELECT id_user FROM user WHERE (freg_u & 2 ) > 0 ". > > freg_u is type smallint. > How I retype freg_u to interger ? ... WHERE (freg_u::integer & 2) ... Or you could use the more standard but long-winded CAST function -- Ric

[SQL] Retype

2003-06-09 Thread Rado Petrik
Hi, I have query " SELECT id_user FROM user WHERE (freg_u & 2 ) > 0 ". freg_u is type smallint. Query return this error. PostgreSQL query failed: ERROR: Unable to identify an operator '&' for types 'smallint' and 'integer' You will have to retype this query using an explicit cast in How I