|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/29/2007 3:28:00 AM
Posts: 7,
Visits: 1
|
|
I have a join of two tables ,where i need to convert null date values to some valid date or a string. How this can done with the COALESCE ?
Kamaldeep kaur
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 7/3/2008 11:03:47 PM
Posts: 41,
Visits: 5
|
|
Hi,
COALESCE(Field name , 'Any string or Valid Date')
Hope this helps
Cheers!!
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/29/2007 3:28:00 AM
Posts: 7,
Visits: 1
|
|
But it is not excepting that,it is throughing an error that IF/THEN datatype are not matching. I hav tried with all format.
kamal
Kamaldeep kaur
|
|
|
|
|
Forum Member
      
Group: Forum Members
Last Login: 7/3/2008 11:03:47 PM
Posts: 41,
Visits: 5
|
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 6/29/2007 3:28:00 AM
Posts: 7,
Visits: 1
|
|
Its wrking with current date , But i wanted to gave exact date there.
Kamaldeep kaur
|
|
|
|
|
Supreme Being
      
Group: Forum Members
Last Login: 11/5/2009 4:40:02 PM
Posts: 717,
Visits: 466
|
|
Hi Kamal,
date: COALESCE(date_col, date '2007-03-19') string: COALESCE(trim(date_col), 'blabla')
Dieter
|
|
|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 10/16/2009 1:19:22 PM
Posts: 1,
Visits: 2
|
|
|
That works like a charm. Thanks!
|
|
|
|