473,715 Members | 5,945 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

checking null values

10 New Member
In a table i have to check each and every column for null values . if the column has null value i need to display as ' NULL VALUE' in the output , for these iam declaring some local variables
Iam checking the column for null value using IF ( col_name IS NULL)
if the column has null value ill assign the variable as null value or else ill assign the value which is there in the column

another thing we can use NVL2 function to do the same

my doubt is perfomance wise which will be better to use
Aug 20 '07 #1
1 2111
debasisdas
8,127 Recognized Expert Expert
Use the function NVL or NVL2 because these are predefined and definately execute in least time.
Aug 21 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

30
2239
by: Michael B Allen | last post by:
I have a general purpose library that has a lot of checks for bad input parameters like: void * linkedlist_get(struct linkedlist *l, unsigned int idx) { if (l == NULL) { errno = EINVAL; return NULL; }
99
5153
by: Mikhail Teterin | last post by:
Hello! Consider the following simple accessor function: typedef struct { int i; char name; } MY_TYPE; const char *
2
3404
by: Chris | last post by:
Hi, I have an SQL Query that loads a SQLDataReader object. The returned record has bit datatype columns that I use to provide true/false values. I can't get a definite answer googling on how to test if this field is null. I get casting errors, and can't check for null on a null data value errors
9
5657
by: D. Shane Fowlkes | last post by:
(ASP.NET 2 / VB) Question - How can I write a If statement to see if a control (textbox) actually exists on a page? Upon page_load, a certain control may or may not be visible on the page so I need to first check to see if it actually exists and then if it does, get the value from it. If I try to read it or check if its "visible" if it's not on the page then of course, it'll error. Thanks!
3
13049
by: Martyn Fewtrell | last post by:
Hi there. I wonder if there was a "correct answer" for Vb.Net (I understand this is quite easy in C#). If im drawing data from a database using a TableAdapter the data ends up in a DataTable. I then need to iterate through the DataTable to get the values out. This in itself is not a big issue. Code something like...
8
4998
by: Fuzzydave | last post by:
Okay, I have been handed a python project and working through it I have had to add a report. I am returning 10 variables the results of an SQL Query and as usual the number of results vary from 1 result to 10 results so I implemented a check to see if the array item was empty or not. The code is below based upon the code already in the python project i was handed.
2
6258
by: misty | last post by:
First i'll introduce myself since I only joined this forum this morning so hey! <waves> Right to the problem. I'm reading values from a html file using the getParameter method to produce an applet. Theres 10 sets of data split into 4 sub fields. The applet works fine but i'd like to make the program more robust by checking for null values. Any ideas? Thanks
42
2796
by: =?Utf-8?B?UGxheWE=?= | last post by:
I have an if statement that isn't working correctly and I was wondering how I check for a blank string. My Code Example if me.fieldname(arrayIndex) = "" then ----- end if When I do this and there is no characters in the variable it does not enter my IF statement like I would think it should. How do I properly check for a
7
1831
by: nospam | last post by:
Hello I need to go through each line of a CSV file, and extract some fields using a regex. Then, I need to check each retrieved field, and if it looks like "", turn this into NULL so that it's correct SQL. I tried a few things, but still can't it working: ======== #Second field might be empty -"" #"Col1",""
0
8821
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9340
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9103
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7973
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5967
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4477
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4738
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3175
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2118
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.