[freetds] READTEXT problem
ZIGLIO, Frediano, VF-IT
Frediano.Ziglio at vodafone.com
Wed Oct 6 04:21:31 EDT 2004
>
> I am trying to use the READTEXT command to some text from a
> table however I
> am failing at the first hurdle. The following SQL is required
>
> DECLARE @ptrval VARBINARY(16)
> SELECT @ptrval = TEXTPTR(P_LONGTEXT) FROM P_SIMPLE WHERE P__URN = 1
> ...
>
> When I execute this in isql or in code (I am using unixODBC)
> the second line
> reports that the variable @ptrval isn¹t defined. Does anyone have any
> suggestions?
>
> Thanks in advance,
> Ian
>
You have to put the command in a single line like
DECLARE @ptrval VARBINARY(16) SELECT @ptrval = TEXTPTR(P_LONGTEXT) FROM P_SIMPLE WHERE P__URN = 1
variables are destroyed at end of statement or batch...
freddy77
More information about the FreeTDS
mailing list