kwilliam10
Board Regular
- Joined
- Sep 6, 2007
- Messages
- 145
Hi all,
I am trying to query data from one worksheet of an Excel workbook. In doing so, I want to add to columns together. One of the columns has null values in it. In Access I would use NZ()...but this is not available in Excel. I've tried the following:
1) case when isnull(segmentdata.Corrections,0) = True then 0 else segmentdata.corrections end as 'Diff'
But I get "Didn't expect 'isnull' after the SELECT column list."
2) case when segmentdata.corrections is null then 0 else segmentdata.corrections end as 'Diff'
But I get "Didn't expect 'segmentdata' after the SELECT column list"
3) coalesce(segmentdata.corrections,0)
But I get "Undefined function 'coalesce' in expression.
4) isnull(segmentdata.corrections)
Which gives me "-1" for null values, and 0 for non-null values
Can someone please point me in the right direction? I really need to convert nulls to zeros and be able to add the columns together.
Thanks in advance!!
Keith W.
I am trying to query data from one worksheet of an Excel workbook. In doing so, I want to add to columns together. One of the columns has null values in it. In Access I would use NZ()...but this is not available in Excel. I've tried the following:
1) case when isnull(segmentdata.Corrections,0) = True then 0 else segmentdata.corrections end as 'Diff'
But I get "Didn't expect 'isnull' after the SELECT column list."
2) case when segmentdata.corrections is null then 0 else segmentdata.corrections end as 'Diff'
But I get "Didn't expect 'segmentdata' after the SELECT column list"
3) coalesce(segmentdata.corrections,0)
But I get "Undefined function 'coalesce' in expression.
4) isnull(segmentdata.corrections)
Which gives me "-1" for null values, and 0 for non-null values
Can someone please point me in the right direction? I really need to convert nulls to zeros and be able to add the columns together.
Thanks in advance!!
Keith W.