Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Copying a text column between 2 tables

8 posts in General Discussion Last posting was on 2010-12-12 16:17:12.0Z
Jose Manuel Espinoza Posted on 2010-12-10 19:32:26.0Z
From: Jose Manuel Espinoza <jmespinoza@seicom.com.mx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Copying a text column between 2 tables
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Antivirus: avast! (VPS 101207-1, 07/12/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d02804a$1@forums-1-dub>
Date: 10 Dec 2010 11:32:26 -0800
X-Trace: forums-1-dub 1292009546 10.22.241.152 (10 Dec 2010 11:32:26 -0800)
X-Original-Trace: 10 Dec 2010 11:32:26 -0800, vip152.sybase.com
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29799
Article PK: 79033

Hi,

I'm having some trouble with this: I have a table that can save a text
column, and can be null. Also, have another table containing some of the
columns from the first, and this should take the Text column if not
empty, otherwise must take a char column from a third table, all of this
within the SP.

If I try to do it:

Create ...
Begin
.
.
.
Insert into B(id, description)
Select A.id,
Case when DataLength(A.large_text) < 1 then
C.describe_it
Else
A.large_text
End
Where id = @id
.
.
.
End


I get this error:
Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not allowed.
Use the CONVERT function to run this query.

( only the C table has a char column. A and B are text columns )

Any suggestion?

Thanks in advance!

***PS: I'm on ASE 12.5, and perhaps I'll be moving it to ASE 15 in short
time.


Carl Kayser Posted on 2010-12-10 19:57:44.0Z
From: "Carl Kayser" <kayser_c@bls.gov>
Newsgroups: sybase.public.ase.general
References: <4d02804a$1@forums-1-dub>
Subject: Re: Copying a text column between 2 tables
Lines: 67
Organization: BLS
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.5931
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d028638$1@forums-1-dub>
Date: 10 Dec 2010 11:57:44 -0800
X-Trace: forums-1-dub 1292011064 10.22.241.152 (10 Dec 2010 11:57:44 -0800)
X-Original-Trace: 10 Dec 2010 11:57:44 -0800, vip152.sybase.com
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29801
Article PK: 79027


"Jose Manuel Espinoza" <jmespinoza@seicom.com.mx> wrote in message
news:4d02804a$1@forums-1-dub...
> Hi,
>
> I'm having some trouble with this: I have a table that can save a text
> column, and can be null. Also, have another table containing some of the
> columns from the first, and this should take the Text column if not empty,
> otherwise must take a char column from a third table, all of this within
> the SP.
>
> If I try to do it:
>
> Create ...
> Begin
> .
> .
> .
> Insert into B(id, description)
> Select A.id,
> Case when DataLength(A.large_text) < 1 then
> C.describe_it
> Else
> A.large_text
> End
> Where id = @id
> .
> .
> .
> End
>
>
> I get this error:
> Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not allowed. Use
> the CONVERT function to run this query.
>
> ( only the C table has a char column. A and B are text columns )
>
> Any suggestion?
>
> Thanks in advance!
>
> ***PS: I'm on ASE 12.5, and perhaps I'll be moving it to ASE 15 in short
> time.

Have you tried an explicit conversion (and some form of a join):

Insert into B (id, description)
select A.id,
case
when DataLength (A.large_text) < 1 then convert
(text, C.describe_it)
else
A.large_text
end
from A, C
where A.id = @id
and C.id = @id
.
.

The error message does not seem to conform with the type descriptions
provided. You're trying to (sometimes) place a char column into a text
column? But the error message says the opposite.


Jose Manuel Espinoza Posted on 2010-12-10 22:19:03.0Z
From: Jose Manuel Espinoza <jmespinoza@seicom.com.mx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
References: <4d02804a$1@forums-1-dub> <4d028638$1@forums-1-dub>
In-Reply-To: <4d028638$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: avast! (VPS 101207-1, 07/12/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d02a757$1@forums-1-dub>
Date: 10 Dec 2010 14:19:03 -0800
X-Trace: forums-1-dub 1292019543 10.22.241.152 (10 Dec 2010 14:19:03 -0800)
X-Original-Trace: 10 Dec 2010 14:19:03 -0800, vip152.sybase.com
Lines: 90
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29803
Article PK: 79031

Actually, the Text column from A will be empty the most of the times so
B should be filled in with the char column from C.

I double checked datatypes: and A and B are text, while C is a char.

I tried by doing the insert without any conditional, first inserting
directly from C and worked; then changed to take A directly and worked
too. Seems that the condition gives some trouble to the compiler, IMO.

Oh, and yes, A,B, and C are used in the query's join.

Is there any workaround?

The only one I can think of is creating a process in the front
end(PowerBuilder) to simulate this SP :s, but I'd rather to keep this in
the database.


thanks!


El 10/12/2010 01:57 p.m., Carl Kayser escribió:

> "Jose Manuel Espinoza"<jmespinoza@seicom.com.mx> wrote in message
> news:4d02804a$1@forums-1-dub...
>> Hi,
>>
>> I'm having some trouble with this: I have a table that can save a text
>> column, and can be null. Also, have another table containing some of the
>> columns from the first, and this should take the Text column if not empty,
>> otherwise must take a char column from a third table, all of this within
>> the SP.
>>
>> If I try to do it:
>>
>> Create ...
>> Begin
>> .
>> .
>> .
>> Insert into B(id, description)
>> Select A.id,
>> Case when DataLength(A.large_text)< 1 then
>> C.describe_it
>> Else
>> A.large_text
>> End
>> Where id = @id
>> .
>> .
>> .
>> End
>>
>>
>> I get this error:
>> Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not allowed. Use
>> the CONVERT function to run this query.
>>
>> ( only the C table has a char column. A and B are text columns )
>>
>> Any suggestion?
>>
>> Thanks in advance!
>>
>> ***PS: I'm on ASE 12.5, and perhaps I'll be moving it to ASE 15 in short
>> time.
>
>
> Have you tried an explicit conversion (and some form of a join):
>
> Insert into B (id, description)
> select A.id,
> case
> when DataLength (A.large_text)< 1 then convert
> (text, C.describe_it)
> else
> A.large_text
> end
> from A, C
> where A.id = @id
> and C.id = @id
> .
> .
>
> The error message does not seem to conform with the type descriptions
> provided. You're trying to (sometimes) place a char column into a text
> column? But the error message says the opposite.
>
>


"Mark A. Parsons" <iron_horse Posted on 2010-12-10 22:52:13.0Z
From: "Mark A. Parsons" <iron_horse@no_spamola.compuserve.com>
User-Agent: Thunderbird 1.5.0.10 (Windows/20070221)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
References: <4d02804a$1@forums-1-dub> <4d028638$1@forums-1-dub> <4d02a757$1@forums-1-dub>
In-Reply-To: <4d02a757$1@forums-1-dub>
Content-Type: multipart/mixed; boundary="------------050507010506020004090401"
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d02af1d$1@forums-1-dub>
Date: 10 Dec 2010 14:52:13 -0800
X-Trace: forums-1-dub 1292021533 10.22.241.152 (10 Dec 2010 14:52:13 -0800)
X-Original-Trace: 10 Dec 2010 14:52:13 -0800, vip152.sybase.com
Lines: 190
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29804
Article PK: 79030

Using the convert() function (same thing Carl's already recommended) the query seems to work just fine. (see attached)

NOTE: I'm on ASE 15.0.3; I don't have immediate access to a 12.5 dataserver so I'm *assuming* this will work on ASE
12.5, too.

-----------

If you still can't get this to work then you really need to provide a *complete* test case that reproduces the issue.

So far you haven't provided the actual table definitions, any sample data, or any complete/valid SQL statements.

It's kinda hard to provide debugging suggestions without knowing *exactly* what we're trying to debug.

Jose Manuel Espinoza wrote:
>
> Actually, the Text column from A will be empty the most of the times so
> B should be filled in with the char column from C.
>
> I double checked datatypes: and A and B are text, while C is a char.
>
> I tried by doing the insert without any conditional, first inserting
> directly from C and worked; then changed to take A directly and worked
> too. Seems that the condition gives some trouble to the compiler, IMO.
>
> Oh, and yes, A,B, and C are used in the query's join.
>
> Is there any workaround?
>
> The only one I can think of is creating a process in the front
> end(PowerBuilder) to simulate this SP :s, but I'd rather to keep this in
> the database.
>
>
> thanks!
>
>
> El 10/12/2010 01:57 p.m., Carl Kayser escribió:
>> "Jose Manuel Espinoza"<jmespinoza@seicom.com.mx> wrote in message
>> news:4d02804a$1@forums-1-dub...
>>> Hi,
>>>
>>> I'm having some trouble with this: I have a table that can save a text
>>> column, and can be null. Also, have another table containing some of the
>>> columns from the first, and this should take the Text column if not
>>> empty,
>>> otherwise must take a char column from a third table, all of this within
>>> the SP.
>>>
>>> If I try to do it:
>>>
>>> Create ...
>>> Begin
>>> .
>>> .
>>> .
>>> Insert into B(id, description)
>>> Select A.id,
>>> Case when DataLength(A.large_text)< 1 then
>>> C.describe_it
>>> Else
>>> A.large_text
>>> End
>>> Where id = @id
>>> .
>>> .
>>> .
>>> End
>>>
>>>
>>> I get this error:
>>> Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not allowed.
>>> Use
>>> the CONVERT function to run this query.
>>>
>>> ( only the C table has a char column. A and B are text columns )
>>>
>>> Any suggestion?
>>>
>>> Thanks in advance!
>>>
>>> ***PS: I'm on ASE 12.5, and perhaps I'll be moving it to ASE 15 in short
>>> time.
>>
>>
>> Have you tried an explicit conversion (and some form of a join):
>>
>> Insert into B (id, description)
>> select A.id,
>> case
>> when DataLength (A.large_text)< 1 then convert
>> (text, C.describe_it)
>> else
>> A.large_text
>> end
>> from A, C
>> where A.id = @id
>> and C.id = @id
>> .
>> .
>>
>> The error message does not seem to conform with the type descriptions
>> provided. You're trying to (sometimes) place a char column into a text
>> column? But the error message says the opposite.
>>
>>
>

create table A ( id int, large_text text null)
create table B ( id int, description text)
create table C ( id int, describe_it varchar(100))
go

insert A values (1,null)
insert A values (2,'this is a piece of text')
insert C values (1,'vc 1')
insert C values (2,'vc 2')
go


select * from A
select * from B
select * from C
go



id large_text
----------- ------------------------------------
1 NULL
2 this is a piece of text


id description
----------- ------------------------------------


id describe_it
----------- ------------------------------------
1 vc 1
2 vc 2





create proc add_to_B
@id int
as
insert B
select A.id,
case when datalength(A.large_text) < 1
then convert(text,C.describe_it)
else A.large_text
end
from A, C
where A.id = @id
and C.id = @id
and A.id = C.id
go

exec add_to_B 1
go
exec add_to_B 2
go



select * from B
go

id description
----------- ------------------------------------
1 vc 1
2 this is a piece of text


Jose Manuel Espinoza Posted on 2010-12-10 23:20:11.0Z
From: Jose Manuel Espinoza <jmespinoza@seicom.com.mx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
References: <4d02804a$1@forums-1-dub> <4d028638$1@forums-1-dub> <4d02a757$1@forums-1-dub> <4d02af1d$1@forums-1-dub>
In-Reply-To: <4d02af1d$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: avast! (VPS 101210-1, 10/12/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d02b5ab$1@forums-1-dub>
Date: 10 Dec 2010 15:20:11 -0800
X-Trace: forums-1-dub 1292023211 10.22.241.152 (10 Dec 2010 15:20:11 -0800)
X-Original-Trace: 10 Dec 2010 15:20:11 -0800, vip152.sybase.com
Lines: 133
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29806
Article PK: 79035

Mark, I just tested by creating my tables and SP in 15.0.2 and it worked
fine.

However, when I do the convert on 12.5 shows this:

Operand type clash: TEXT is incompatible with TEXT


I thought it was because I have the ASE 15 in my lap, and the database
is 12.5 so I went to the server and wrote the SP in SQL Advantage. Same
error.

Well, at least now I know that when I move to 15 it will work :p


Thanks for your help!


El 10/12/2010 04:52 p.m., Mark A. Parsons escribió:

> Using the convert() function (same thing Carl's already recommended) the
> query seems to work just fine. (see attached)
>
> NOTE: I'm on ASE 15.0.3; I don't have immediate access to a 12.5
> dataserver so I'm *assuming* this will work on ASE 12.5, too.
>
> -----------
>
> If you still can't get this to work then you really need to provide a
> *complete* test case that reproduces the issue.
>
> So far you haven't provided the actual table definitions, any sample
> data, or any complete/valid SQL statements.
>
> It's kinda hard to provide debugging suggestions without knowing
> *exactly* what we're trying to debug.
>
> Jose Manuel Espinoza wrote:
>>
>> Actually, the Text column from A will be empty the most of the times
>> so B should be filled in with the char column from C.
>>
>> I double checked datatypes: and A and B are text, while C is a char.
>>
>> I tried by doing the insert without any conditional, first inserting
>> directly from C and worked; then changed to take A directly and worked
>> too. Seems that the condition gives some trouble to the compiler, IMO.
>>
>> Oh, and yes, A,B, and C are used in the query's join.
>>
>> Is there any workaround?
>>
>> The only one I can think of is creating a process in the front
>> end(PowerBuilder) to simulate this SP :s, but I'd rather to keep this
>> in the database.
>>
>>
>> thanks!
>>
>>
>> El 10/12/2010 01:57 p.m., Carl Kayser escribió:
>>> "Jose Manuel Espinoza"<jmespinoza@seicom.com.mx> wrote in message
>>> news:4d02804a$1@forums-1-dub...
>>>> Hi,
>>>>
>>>> I'm having some trouble with this: I have a table that can save a text
>>>> column, and can be null. Also, have another table containing some of
>>>> the
>>>> columns from the first, and this should take the Text column if not
>>>> empty,
>>>> otherwise must take a char column from a third table, all of this
>>>> within
>>>> the SP.
>>>>
>>>> If I try to do it:
>>>>
>>>> Create ...
>>>> Begin
>>>> .
>>>> .
>>>> .
>>>> Insert into B(id, description)
>>>> Select A.id,
>>>> Case when DataLength(A.large_text)< 1 then
>>>> C.describe_it
>>>> Else
>>>> A.large_text
>>>> End
>>>> Where id = @id
>>>> .
>>>> .
>>>> .
>>>> End
>>>>
>>>>
>>>> I get this error:
>>>> Implicit conversion from datatype 'TEXT' to 'VARCHAR' is not
>>>> allowed. Use
>>>> the CONVERT function to run this query.
>>>>
>>>> ( only the C table has a char column. A and B are text columns )
>>>>
>>>> Any suggestion?
>>>>
>>>> Thanks in advance!
>>>>
>>>> ***PS: I'm on ASE 12.5, and perhaps I'll be moving it to ASE 15 in
>>>> short
>>>> time.
>>>
>>>
>>> Have you tried an explicit conversion (and some form of a join):
>>>
>>> Insert into B (id, description)
>>> select A.id,
>>> case
>>> when DataLength (A.large_text)< 1 then convert
>>> (text, C.describe_it)
>>> else
>>> A.large_text
>>> end
>>> from A, C
>>> where A.id = @id
>>> and C.id = @id
>>> .
>>> .
>>>
>>> The error message does not seem to conform with the type descriptions
>>> provided. You're trying to (sometimes) place a char column into a text
>>> column? But the error message says the opposite.
>>>
>>>
>>


jobless Posted on 2010-12-10 20:44:16.0Z
Sender: 692e.4cffeab4.1804289383@sybase.com
From: jobless
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d02911f.774a.1681692777@sybase.com>
References: <4d02804a$1@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 10 Dec 2010 12:44:16 -0800
X-Trace: forums-1-dub 1292013856 10.22.241.41 (10 Dec 2010 12:44:16 -0800)
X-Original-Trace: 10 Dec 2010 12:44:16 -0800, 10.22.241.41
Lines: 47
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29802
Article PK: 79034


> Hi,
>
> I'm having some trouble with this: I have a table that can
> save a text column, and can be null. Also, have another
> table containing some of the columns from the first, and
> this should take the Text column if not empty, otherwise
> must take a char column from a third table, all of this
> within the SP.
>
> If I try to do it:
>
> Create ...
> Begin
> .
> .
> .
> Insert into B(id, description)
> Select A.id,
> Case when DataLength(A.large_text) < 1 then
> C.describe_it
> Else
> A.large_text
> End
> Where id = @id
> .
> .
> .
> End
>
>
> I get this error:
> Implicit conversion from datatype 'TEXT' to 'VARCHAR' is
> not allowed. Use the CONVERT function to run this query.
>
> ( only the C table has a char column. A and B are text
> columns )
>
> Any suggestion?
>
> Thanks in advance!
>
> ***PS: I'm on ASE 12.5, and perhaps I'll be moving it to
> ASE 15 in short time.

Alternative would be 1)insert null in B.description then 2)
update B conditionally using plain update(varchar col from
C) OR (text column from A) using readtext and writetext;


Jose Manuel Espinoza Posted on 2010-12-10 22:56:04.0Z
From: Jose Manuel Espinoza <jmespinoza@seicom.com.mx>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
References: <4d02804a$1@forums-1-dub> <4d02911f.774a.1681692777@sybase.com>
In-Reply-To: <4d02911f.774a.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: avast! (VPS 101210-1, 10/12/2010), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4d02b004$1@forums-1-dub>
Date: 10 Dec 2010 14:56:04 -0800
X-Trace: forums-1-dub 1292021764 10.22.241.152 (10 Dec 2010 14:56:04 -0800)
X-Original-Trace: 10 Dec 2010 14:56:04 -0800, vip152.sybase.com
Lines: 35
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29805
Article PK: 79032

Thanks for your idea...

I did it like you suggested, just with normal Update:

after inserting using C column as default:

Insert into B(id, description)
Select A.id, C.describe_it
Where A.other = C.other
and A.id = @id

Then do a normal update:

Update B
Set description = A.large_text
from A
Where A.id = B.id
and DataLength( A.large_text ) > 1
and B.id = @id

This works, but I have a doubt: how many chars can support this
statement? Frankly, I haven't used readtext/writetext before, and after
reading a few seems a little bit more complicated than this simple
update :s

Or maybe is this friday's madness? :p

Thanks again!


El 10/12/2010 02:44 p.m., jobless escribió:

> Alternative would be 1)insert null in B.description then 2)
> update B conditionally using plain update(varchar col from
> C) OR (text column from A) using readtext and writetext;


jobless Posted on 2010-12-12 16:17:12.0Z
Sender: 1749.4cfeaa31.1804289383@sybase.com
From: jobless
Newsgroups: sybase.public.ase.general
Subject: Re: Copying a text column between 2 tables
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4d04f587.22df.1681692777@sybase.com>
References: <4d02b004$1@forums-1-dub>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 12 Dec 2010 08:17:12 -0800
X-Trace: forums-1-dub 1292170632 10.22.241.41 (12 Dec 2010 08:17:12 -0800)
X-Original-Trace: 12 Dec 2010 08:17:12 -0800, 10.22.241.41
Lines: 44
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:29807
Article PK: 79036

You might not need readtext/writetext given the update you
listed did not error; Your update is good, there wont be any
char limitation as the datatypes are same;

readtext/writetext are fun depending on the requirement(not
straight forward though, its been over 7 years since i
*actively coded* and moved on to dba stuff)

> Thanks for your idea...
>
> I did it like you suggested, just with normal Update:
>
> after inserting using C column as default:
>
> Insert into B(id, description)
> Select A.id, C.describe_it
> Where A.other = C.other
> and A.id = @id
>
> Then do a normal update:
>
> Update B
> Set description = A.large_text
> from A
> Where A.id = B.id
> and DataLength( A.large_text ) > 1
> and B.id = @id
>
> This works, but I have a doubt: how many chars can support
> this statement? Frankly, I haven't used
> readtext/writetext before, and after reading a few seems
> a little bit more complicated than this simple update :s
>
> Or maybe is this friday's madness? :p
>
> Thanks again!
>
>
> El 10/12/2010 02:44 p.m., jobless escribió:
> > Alternative would be 1)insert null in B.description then
> > 2) update B conditionally using plain update(varchar col
> > from C) OR (text column from A) using readtext and
> writetext;
>