1

enter image description here

I'm getting Null values for 'AltReimMethod', which I want to convert to empty string values. Here's the query :

(SELECT rc.name from ReimbursementChoice rc WHERE rc.admin_id = a.admin_id AND rc.choice_id = pe.alt_payment_choice) AS 'AltReimMethod'

I tried

(SELECT (ISNULL(rc.name,' ')) from ReimbursementChoice rc WHERE rc.admin_id = a.admin_id AND rc.choice_id = pe.alt_payment_choice) AS 'AltReimMethod'

And also

(SELECT (ISNULL(CONVERT(varchar(50),rc.name),' ')) from ReimbursementChoice rc WHERE rc.admin_id = a.admin_id AND rc.choice_id = pe.alt_payment_choice) AS 'AltReimMethod'

They don't show any errors but I don't even get any results.

halfer
  • 19,824
  • 17
  • 99
  • 186
fOcusWow
  • 383
  • 1
  • 5
  • 14

1 Answers1

3

Apply IsNull on query, not apply isnull inside query:

ISNULL((SELECT rc.name from ReimbursementChoice rc WHERE 
rc.admin_id = a.admin_id AND rc.choice_id = pe.alt_payment_choice),' ') 
AS 'AltReimMethod'
halfer
  • 19,824
  • 17
  • 99
  • 186
Pranay Rana
  • 175,020
  • 35
  • 237
  • 263