Hello Gurus,
I'm trying to populate a column based on if it's null or not.
If it's null i want to populate with another column values. If it's not null then populate with the same column value.
I wrote the query like below but I'm getting error saying 'SQL command not properly ended'
select school_id, class_id from school
where class_id= case when
class_id IS NOT NULL then
class_id
when class_id IS NULL thenschool_id
end as
class_id
Please help me!! Thanks