Show a one to many relationship as 2 columns – 1 unique row (ID & comma separated list)

I believe that the answer you need is a user-defined aggregate, similar to this one: CREATE FUNCTION gc_init(dummy VARCHAR(255)) RETURNING LVARCHAR; RETURN ”; END FUNCTION; CREATE FUNCTION gc_iter(result LVARCHAR, value VARCHAR(255)) RETURNING LVARCHAR; IF result=”” THEN RETURN TRIM(value); ELSE RETURN result || ‘,’ || TRIM(value); END IF; END FUNCTION; CREATE FUNCTION gc_comb(partial1 LVARCHAR, partial2 LVARCHAR) … Read more

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints

This problem is usually caused by one of the following null values being returned for columns not set to AllowDBNull duplicate rows being returned with the same primary key. a mismatch in column definition (e.g. size of char fields) between the database and the dataset Try running your query natively and look at the results, … Read more