search for NULL fields [message #541532] |
Wed, 01 February 2012 00:01 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/bc527a3a024fa498a3a8c878ec82e08d?s=64&d=mm&r=g) |
new_oracle2011
Messages: 174 Registered: March 2011 Location: Qatar
|
Senior Member |
|
|
Is there any way to see items in the block having null in them? I want to figure out null field before inserting the data in the database table. At the moment I am having an error ORA 01400 which means that a NULL cannot be inserted into NOT NULL column. So, I want to create a procedure which will fire before insert trigger of the block and it will show me the names of items having null it them.
Procedure check_data(block_name in varchar2)
First_item varchar(20);
Current_item varchar(20);
Last_item varchar(20);
Begin
First_item := get_block_property(block_name, FIRST_ITEM);
Last_item := get_block_property(block_name, LAST_ITEM);
Current_item := first_item;
Loop
If value_of(current_item) is null then
Message(current_item); pause;
End if;
Exit when current_item = last_item;
Current_item := the_item_after(current_item);
End loop;
End;
The problem is that I don't know the function to get the value inserted by user in the field so that I can compare it in IF condition. Please let me know if there is any function or do suggest be other way to do this.
|
|
|
|
|
|