Ted - thanks again for your feedback.

The deal - I can't just blatantly convert Zero values to NULL values. You see - 
for many instances - Zero for a tax rate is Legit. 

So - before they do certain data processing - data is pulled in from MS SQL. 
And, that Select command I showed - which was only Part of the full Select 
command - that's where it initially pulls in the data. As such, at that point - 
I can NOT flip Zero values to NULL. However, in pulling in the data into the 
Cursor - I want to be able to ALLOW the taxratee_el field to be able to 
Store/hold a NULL value. Because, when they do certain processing - and based 
upon another field - that's when I need to force the taxratee_el to have a 
value of NULL.

Hope this makes more sense. 

So - it seems I should do something like what Charlie stated - but, for this 
tax field. Maybe like this:
SELECT  d.secid ,d.sec_name AS sec_nam ,d.coi AS issue_cnty ,
    CAST(t.taxrate_el AS N(12,2) NULL) AS taxrate_el
   FROM [dbo].[Dividends] as d JOIN [dbo].[Trandata] as t
     ON t.dividend_id = d.dividend_id

I suspect that will do the trick. Am going to try it now.

Regards,
Kurt Wendt
Senior Systems Analyst 


Tel. +1-212-747-9100
www.GlobeTax.com


-----Original Message-----
From: ProfoxTech [mailto:[email protected]] On Behalf Of Ted Roche
Sent: Tuesday, June 14, 2016 6:56 PM
To: [email protected]
Subject: Re: A Blank Value for a Number?

Yes, but a BLANK in a numeric field evaluates to zero.

What you want is something like:

SELECT  d.secid ,d.sec_name AS sec_nam ,d.coi AS issue_cnty ,
    IIF(t.taxrate_el=0, NULL, t.taxratee_el) AS taxrate_el
   FROM [dbo].[Dividends] as d JOIN [dbo].[Trandata] as t
     ON t.dividend_id = d.dividend_id

Use the IIF to inject the NULL, and the AS clause to keep the result from being 
named exp_1 or something.

On Tue, Jun 14, 2016 at 6:05 PM, foxdev <[email protected]> wrote:
> My understanding is numeric fields can hold blank values. Isn't that what the 
> BLANK FIELD command and ISBLANK () is all about ?
> -------- Original message --------From: Dave Thayer <[email protected]> 
> Date: 15/06/2016  00:49  (GMT+02:00) To: [email protected] Subject: Re: A 
> Blank Value for a Number?
> On Tue, Jun 14, 2016 at 3:41 PM, Kurt Wendt <[email protected]> wrote:
>> OK - part of the code in the system pulls data from MS SQL. So - I was 
>> trying to mod this code - to add NULL as an option into the Select. But, I 
>> suspect I'm not doing it correctly. Was looking around in online help - but, 
>> could not quickly find the answer. So - I took a shot at trying to implement 
>> this. This is only Part of the line of code - but, you can see the attempt 
>> to define NULL:
>> SELECT  d.secid ,d.sec_name AS sec_nam ,d.coi AS issue_cnty ,
>>      t.taxrate_el NULL FROM [dbo].[Dividends] as d JOIN [dbo].[Trandata] as t
>>      ON t.dividend_id = d.dividend_id
>>
>
> Maybe something like ...CASE WHEN t.taxrate_el = 0 THEN NULL ELSE 
> t.taxrate_el END AS taxrate_el FROM ....
>
> --
> Dave Thayer
> Denver, CO
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/80838f1ca795b14ea1af48659f35166f2bd...@drexch02.corp.globetax.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to