var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Error when trying to copy data from differents columns
I am using Sybase v11.x. I am trying to copy from one
column to another column in a stored procedure as follows:
SET column1 = (select column2 from tbl2 where @variable =
WHERE @parameter = parameter
Everything is declared approriately.
The problem seems to be the datatypes TEXT for both column1
and column2, the error I get is:
"The ONCE AGGREGATE operation cannot take a TEXT datatype as
I cannot covert these to other data types and they will
always be longer than 255 characters.
Does anyone know a way I can get around this? (apart from
using version 12.x where I can convert/cast and > 255
Maybe try a join
SET column1 = tbl2.column2
from tbl1, tbl2
where @variable = tbl2.variable
and @parameter = tbl1.parameter
Thanks for your reply. Seems the fact of encapsulating the subquery in brackets I am creating a local variable which is a TEXT datatype and not allowed in this case.
SET tbl1.col1 = tbl2.col1 from tbl2
WHERE @param = tbl1.col2 and @param = tbl2.col2