Subject | Re: [firebird-support] cast blob sub_type 1 to varchar |
---|---|
Author | Thomas Steinmaurer |
Post date | 2008-05-30T12:22:55Z |
> I have a table with a blob field sub_type 1, and I want to get justDepending on your Firebird version, you could directly use the SUBSTRING
> the first 20 characters for each record. (The field contains data
> compressed with LZH).
>
> So I am doing:
>
> SELECT CAST(text_field_name as VARCHAR(20)) from table_name
>
> Is this the right way for doing that?. Using FlameRobin I get the
> next report:
> ------------------------
> Starting transaction...
> Preparing query: select cast("TEXT" as varchar(20)) FROM "MOVI"
> Prepare time: 00:00:00.
> Field #01: .CAST Alias:CAST Type:STRING(20)
> PLAN (MOVI NATURAL)
>
> Executing...
> Done.
> 183 fetches, 0 marks, 10 reads, 0 writes.
> 0 inserts, 0 updates, 0 deletes, 44 index, 4 seq.
> Delta memory: 18804 bytes.
> Execute time: 00:00:08.
> -------------------------
> But then I get a messagebox reporting an error, Engine Code 335544321.
function on a BLOB sub_type 1.
--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com