Skip to content

Group by column and multiple Rows into One Row multiple columns

Please help me this: I want to group by column TestType, but Result should be splitted into colunms if they have same TestType I want SQL to return data in this format Result# column should be dynamic because each TestType has many Results Answer As I mention in the comments, what you need here is a PIVOT or …

Efficient way to ignore whitespace in DB2?

I am running queries in a large IBM DB2 database table (let’s call it T) and have found that the cells for column Identifier tend to be padded not just on the margins, but in between as well, as in: ‘ ID1 ID2 ‘. I do not have rights to update this DB, nor would I, given a number of