Hi All,
I'm new to DB2 but know SQL Server and Oracle well. I'm looking at a definition for a view in a DB2 database and have a question about the line below which is from my view definition
select coalesce(brandid, char(space(4),4)) from mytable
To translate the above into normal English, is the following correct: If brandid is not null, brandid, else ' ' (four spaces).
If this is correct, my question is: Is char(space(4),4) redundant?
TIA,
Sven
I'm new to DB2 but know SQL Server and Oracle well. I'm looking at a definition for a view in a DB2 database and have a question about the line below which is from my view definition
select coalesce(brandid, char(space(4),4)) from mytable
To translate the above into normal English, is the following correct: If brandid is not null, brandid, else ' ' (four spaces).
If this is correct, my question is: Is char(space(4),4) redundant?
TIA,
Sven