Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COALESCE problems

Status
Not open for further replies.

dwhalen

Programmer
Feb 22, 2002
105
CA
I am trying to use COALESCE on two aggregrate functions. One being a AVG and the other a COUNT. When nothing is returned I want to display either text or say 0. Am I using the wrong thing here? This is my code:

COALESCE((date_trunc('minute',AVG(AGE(t.close_date,t.creation_date))))::varchar),'None ') AS TimeFrame,

COALESCE((COUNT(t.task_id)::varchar),0)

Any suggestions??

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top