473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Nested IIF function

I have the following NZ function :
UPDATE Products SET items = NZ(items,0) + " & Nz(Quantity, 0)

This function sets the null values to zeroes for computational
purposes.

I want to test this NZ function whether or not the function was
invoked(if the value was null you get i True).It will mean that i will
exit the function if item are 0.
I want to do it with a nested IIF function,so at least
i have read that one could do it,but i coudnt make it.The function i
have read in the book is the following:
Iif(Nz(MyVal)="", "No Value",MyVal)
I wonder how cani apply it in my function? If i succeed i will have a
very professional code indeed.
Nov 12 '05 #1
1 1736
"Johm" <ke**@abv.bg> wrote in message
news:24**************************@posting.google.c om...
I have the following NZ function :
UPDATE Products SET items = NZ(items,0) + " & Nz(Quantity, 0)

This function sets the null values to zeroes for computational
purposes.
You're permanently changing the null values to 0. If this is just for
'computational purposes' then you probably don't need to do that. What's the
computation? Otherwise why not set the fields to 'required' in the first
place?
I want to test this NZ function whether or not the function was
invoked(if the value was null you get i True).It will mean that i will
exit the function if item are 0.
I want to do it with a nested IIF function,so at least
i have read that one could do it,but i coudnt make it.The function i
have read in the book is the following: Iif(Nz(MyVal)="", "No Value",MyVal)
From what you've said you're talking numbers here, so shouldn't that be:

Iif(Nz(MyVal)=0, "No Value",MyVal)
I wonder how cani apply it in my function? If i succeed i will have a
very professional code indeed.


HTH Mike MacSween
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andy Baker | last post by:
Hi there, I'm learning Python at the moment and trying to grok the thinking behind it's scoping and nesting rules. I was googling for nested functions and found this Guido quote:...
7
by: block111 | last post by:
Hello, code like this: int f1(int x){ int f2(int y){ return y*y; } if(x > 0) return f2(x);
5
by: Andy | last post by:
How can you unit test nested functions? Or do you have to pull them out to unit test them, which basically means I will never use nested functions. Also, same thing with private member functions...
77
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html The above link shows that C# is 450% slower on something as simple as a nested loop....
9
by: Gregory Petrosyan | last post by:
I often make helper functions nested, like this: def f(): def helper(): ... ... is it a good practice or not? What about performance of such constructs?
37
by: Tim N. van der Leeuw | last post by:
Hi, The following might be documented somewhere, but it hit me unexpectedly and I couldn't exactly find this in the manual either. Problem is, that I cannot use augmented assignment operators...
78
by: Josiah Manson | last post by:
I found that I was repeating the same couple of lines over and over in a function and decided to split those lines into a nested function after copying one too many minor changes all over. The only...
3
by: jdurancomas | last post by:
Dear all, I'm trying to declare the operator++ to a nested class. The nested class is not template but the container it is. The code used in teh sample program is included bellow: ...
4
by: Wolfgang Draxinger | last post by:
If you know languages like Python or D you know, that nested functions can be really handy. Though some compilers (looking at GCC) provide the extension of nested functions, I wonder, how one...
2
by: Johannes Bauer | last post by:
Nick Keighley schrieb: Why is there actually a *need* for nested functions? If functionality of subfunctions which are only locally visible is desired, why not put the nesting function parent...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.