How to make a function use CASE and IFNULL in postgreSQL? -


can tell me how use case , ifnull in postgre? i'm migrating sql postgresql, , want make function syntax :

select a.furniture_id, a.furniture_brand, a.furniture_cost,  case    when furniture_id = f_id a.furniture_content    else ''  end content     tb_furniture         (ifnull(a.sale_id,0) = ifnull(f_id,0) or (a.furniture_id = f_id , ifnull(a.furniture_content,'') > ''))      , a.published = 1; 

thanks before(y)

this seems after, check where conditions:

select a.furniture_id, a.furniture_brand, a.furniture_cost,         case when a.furniture_id = f_id        a.furniture_content         else ''         end content tb_furniture (coalesce(a.sale_id,0) = coalesce(f_id,0) or length(content) > 0)   , a.published = 1; 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -