Re: convert help

2006-01-21 Thread Gleb Paharenko
Hello. > ERROR 1314 (0A000): PREPARE is not allowed in stored procedures PREPARE in the stored procedures should work in the latest release (5.0.18). David Godsey wrote: > Thank you. I tried this outside of the procedure and it works. However In > MYSQL 5 I get: > ERROR 1314 (0A000): PREPARE

Re: convert help

2006-01-20 Thread David Godsey
Thank you. I tried this outside of the procedure and it works. However In MYSQL 5 I get: ERROR 1314 (0A000): PREPARE is not allowed in stored procedures Is there a way without needing to use prepare? Any idea why CAST(fdata AS UNSIGNED) doesn't work? David Godsey > Hello. > > You can use this

Re: convert help

2006-01-20 Thread Gleb Paharenko
Hello. You can use this technique: drop procedure if exists test20; DELIMITER $$ create procedure test20() BEGIN DECLARE fdata BLOB; DECLARE foffset INT UNSIGNED; DECLARE flength INT UNSIGNED; DECLARE tmp_int BIGINT UNSIGNED; SELECT 0xAB

Re: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread David Godsey
t; mysql> call test20(); >> Query OK, 0 rows affected (0.00 sec) >> >> mysql> >> mysql> select @fdata, hex(@fdata) >> -> >> -> ; >> ++-+ >> | @fdata | hex(@fdata) | >> ++-+ >> | ═∩☺

Re: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread Peter Brawley
d Godsey [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 19, 2006 3:33 PM To: mysql@lists.mysql.com Subject: [SPAM] - convert help - Bayesian Filter detected spam I am trying to convert binary data to a bigint so I can do bitwise operations on the data, and I'm having trouble doing it. I notic

RE: [SPAM] - convert help - Bayesian Filter detected spam

2006-01-19 Thread Gordon Bruce
David Godsey [mailto:[EMAIL PROTECTED] Sent: Thursday, January 19, 2006 3:33 PM To: mysql@lists.mysql.com Subject: [SPAM] - convert help - Bayesian Filter detected spam I am trying to convert binary data to a bigint so I can do bitwise operations on the data, and I'm having trouble doing it.

convert help

2006-01-19 Thread David Godsey
I am trying to convert binary data to a bigint so I can do bitwise operations on the data, and I'm having trouble doing it. I noticed that if I have binary data and I: select data>>1; I get 0 (not what I'm expecting). Here is a test procedure I wrote: create procedure test20 () BEGIN