Subject | Re: Converting A Blob To A String Within A SP |
---|---|
Author | martinthrelly |
Post date | 2005-11-09T01:32:18Z |
--- In firebird-support@yahoogroups.com, Alexandre Benson Smith
<iblist@t...> wrote:
does this mean that if my blob contains text which is more than 1024
characters long then i will lose the rest of it? if so whats the max
varchar size i can use? and what if the blob size is still bigger
than that?
many thanks for your help alexandre
<iblist@t...> wrote:
>i
> martinthrelly wrote:
>
> >hi there. i have found a UDF in the FreeUDFLib.dll called
> >F_BLOBASPCHAR. this udf allows me to convert a blob to a string.
> >notice that this UDF has a return type of CSTRING(1024).in
> >
> >i need to manipulate this string within a stored procedure. but
> >order to do this i guess i must first assign the returned UDFvalue to
> >a local variable.o
> >
> >but i cant go like this because cstring is not a recognised type
> >dont think:it
> >declare variable mystring cstring(1024);
> >
> >
> declare variable MyString varchar(1024);
>
> >mystring = F_BLOBASPCHAR(myblob);
> >
> >also i cant cast the blob as a firebird varchar data type because
> >might be too big for that.thanks for the quick reply.
> >
> >
> You can use substring, it converts a blob to varchar
>
> Substring(MyBlob from 1 for 1024)
>
> see you !
>
> --
> Alexandre Benson Smith
> Development
> THOR Software e Comercial Ltda
> Santo Andre - Sao Paulo - Brazil
> www.thorsoftware.com.br
>
does this mean that if my blob contains text which is more than 1024
characters long then i will lose the rest of it? if so whats the max
varchar size i can use? and what if the blob size is still bigger
than that?
many thanks for your help alexandre