Function with blobs, how?

Thomas Flemming tf at qvgps.com
Thu Sep 19 05:29:37 CDT 2013


Hi Ivan,

> Currently we have very limited set of SQL-functions to work with binary
> data  from SQL.


I need a cursor which is sorted according to specific bytes of a blob-field. 
This is not perfect database-design, but somehow for historical reason, I cant 
change this now.

Can you imagine of another way?
Is it possible, to sort the cursor myself?

So maybe first get the cursor unsorted:
cur = db.SqlSelect("select * from mytable")

then iterate through all records, read the blob, extract this specific bytes, 
sort myself and somehow reorder the cursor?


 > Please add it to the mantis as a feature request.
Will you still add this to vnet 4.9?


Tom

Am 19.09.2013 11:34, schrieb Ivan Smahin:
>
> On Sep 19, 2013, at 12:31 AM, Thomas Flemming <tf at qvgps.com> wrote:
>
>> Hi,
>>
>> how do I write a function, which retunrs a specific byte out of a blob-field?
>> For example:
>>
>> CREATE OR REPLACE FUNCTION MyBlob10( inValue blob) RETURNS byte
>> BEGIN
>>    RETURN inValue[10];
>> END
>>
>> This always retunrs a syntax-error after inValue in line 3 when I SqlExecute() this.
>>
>
>
>

-- 
/****************************************
**   Flemming Software Development CC
**   Thomas Flemming
**   PO Box 81244
**   Windhoek, Namibia
**   http://www.quovadis-gps.com
**   mail  tf at qvgps.com
**   +264 (0)81 3329923
**   +49  (0)6182 8492599
***************************************/


More information about the Valentina mailing list