Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

plsql function which will return date

Suppose there are two tables named customers and retailer with some columns. Customers has purpuse_date column and retailer has followup_sell_date and follwup_sell_status columns.

The followup_sell_status column should be either 'YES' Or 'No' values.

Follwup_sell_date column has multiple follow up dates for each case.

So here for this the requirement is you need to write a function which will return 'date' value and the condition will be like

if retailer.followup_sell_status='Yes' then 
   take maximum date(latest of 'Follwup_sell_date' ) of retailer.Follwup_sell_date 
   else customers.purpose_date

Wrote it by using PL/SQL function.help me out please?

Comments