10PoundBrown
MIS
Hi All, thanks for reading my post. I am using a Postgres 7.3 and I have a query that contains lots of empty values, not null really, white space (the php code isnt mine)
Anyway, Im trying to format a report and I want to concatenate commas between my case statements like so
select id||', '||
base_lagtype_id||', '||
status_id||', '||
base_number||', '||
base_name||', '||
base_preds||', '||
base_duration||', '||
case
when base_start_date = '' then 'null'
else base_start_date
end as base_start_date||', '||
case
when base_end_date = '' then 'null'
else base_end_date
end as base_end_date
from sch_schedule_tasks
order by id
Unfortunately I get parse errors back. Anyone point me in the right direction for concatenating between case statements? Thanks
Anyway, Im trying to format a report and I want to concatenate commas between my case statements like so
select id||', '||
base_lagtype_id||', '||
status_id||', '||
base_number||', '||
base_name||', '||
base_preds||', '||
base_duration||', '||
case
when base_start_date = '' then 'null'
else base_start_date
end as base_start_date||', '||
case
when base_end_date = '' then 'null'
else base_end_date
end as base_end_date
from sch_schedule_tasks
order by id
Unfortunately I get parse errors back. Anyone point me in the right direction for concatenating between case statements? Thanks