Subject | Question about strange query |
---|---|
Author | Salvatore Besso |
Post date | 2004-09-13T21:17:05Z |
hello all,
I was wondering if such a query is legal in Firebird, because I get an error
when trying to create the database (this code is into a stored procedure):
DELETE FROM TABLE
WHERE (SOME_INTEGER AND 0x10000 = 0);
UPDATE TABLE
SET SOME_INTEGER = SOME_INTEGER OR 0x10000
WHERE (SOME_INTEGER AND 0x10000 = 0);
In the first case I want to delete only the records where SOME_INTEGER ORed with
that hexadecimal value equals zero (byte 5 not set).
In the second case I want to update SOME_INTEGER setting byte 5 of SOME_INTEGER
only if byte 5 of SOME_INTEGER is zero (not set).
I always get an error of "Invalid token: AND).
Is this possible? If not, how to accomplish this?
Regards
Salvatore
I was wondering if such a query is legal in Firebird, because I get an error
when trying to create the database (this code is into a stored procedure):
DELETE FROM TABLE
WHERE (SOME_INTEGER AND 0x10000 = 0);
UPDATE TABLE
SET SOME_INTEGER = SOME_INTEGER OR 0x10000
WHERE (SOME_INTEGER AND 0x10000 = 0);
In the first case I want to delete only the records where SOME_INTEGER ORed with
that hexadecimal value equals zero (byte 5 not set).
In the second case I want to update SOME_INTEGER setting byte 5 of SOME_INTEGER
only if byte 5 of SOME_INTEGER is zero (not set).
I always get an error of "Invalid token: AND).
Is this possible? If not, how to accomplish this?
Regards
Salvatore