I am using something like this:
select @x=coalesce(@x,'')+col1 from testdatatable
This works perfectly on SQL Server 2008 but for IQ it fails:
SELECT returns more than one row
I am using something like this:
select @x=coalesce(@x,'')+col1 from testdatatable
This works perfectly on SQL Server 2008 but for IQ it fails:
SELECT returns more than one row
We need more information on what your goal is here.
Is your select statement returning multiple rows? If so, IQ is attempting to set a single (varchar?) variable, @x, with many values...which isn't possible. It doesn't look like coalesce is your problem to me.
If are you trying get a single row back from testdatatable, and concatenate that single row's col1 with the @x, why not