Dne 28.12.2011 17:21, Milan Babuskov napsal(a): > Josef Kokeš wrote: >> I am trying to convert a BLOB (unlimited size, theoretically) to a long >> VARCHAR (say, VARCHAR(8192)). This should be easy enough to do: >> >> DECLARE VARIABLE b BLOB; /* input */ > > Which subtype of BLOB? IIRC, BLOB subtype 1 (text) should support > character sets, so you don't have to lose non-ASCII characters. > > If it's a binary blob (subtype 0) you can also try to dump the contents > to a file (using FBExport or your code) and then import it back into a > new subtype 1 blob.
I need to do it on the run, not once, so dump is not an option. With subtype 0, too. Anyway, it turned out the UDF approach works after all, though I really don't see why the new version works while the version I posted in the original question doesn't - as far as I can tell the only difference is that I removed the initialization of the return field. Pepak ------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/firebird-support/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/firebird-support/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
