Home » SQL & PL/SQL » SQL & PL/SQL » ANYDATA
ANYDATA [message #290704] Mon, 31 December 2007 03:12 Go to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
is there any different way to check whether the value is null or not of a anydata datatype??

IF newlist(j).data IS NULL THEN

is not working. newlist is SYS.LCR$_ROW_LIST.

thanx.
Re: ANYDATA [message #290705 is a reply to message #290704] Mon, 31 December 2007 03:18 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What does "is not working" means? Any error?

Regards
Michel
Re: ANYDATA [message #290709 is a reply to message #290704] Mon, 31 December 2007 03:37 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
the IF block is not executing while there is no data.
Re: ANYDATA [message #290720 is a reply to message #290709] Mon, 31 December 2007 04:35 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Are you sure?
Did you try to display the content of the field?

Regards
Michel
Re: ANYDATA [message #290725 is a reply to message #290704] Mon, 31 December 2007 05:06 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
IF newlist(j).data is null THEN
DBMS_OUTPUT.PUT_LINE('null');
ELSE
DBMS_OUTPUT.PUT_LINE(j||': '||newlist(j).data.GETTYPENAME());
if(newlist(j).data.GETNUMBER(test)= dbms_types.success) THEN
DBMS_OUTPUT.PUT_LINE('test'||test);
else
DBMS_OUTPUT.PUT_LINE('non-test'||test);
end if;
END IF;

output:
1: SYS.NUMBER
test

I m not getting the value of test.

thanx.
Re: ANYDATA [message #290729 is a reply to message #290725] Mon, 31 December 2007 05:15 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So data is not null but your number value may be.

Regards
Michel
Re: ANYDATA [message #290730 is a reply to message #290704] Mon, 31 December 2007 05:19 Go to previous messageGo to next message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
yap, there is data and its a number but what s the number???
Re: ANYDATA [message #290734 is a reply to message #290730] Mon, 31 December 2007 05:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
NULL

Regards
Michel
Re: ANYDATA [message #290807 is a reply to message #290704] Mon, 31 December 2007 22:11 Go to previous message
tanmoy1048
Messages: 133
Registered: June 2007
Senior Member
THANX Michel. I got it.
Previous Topic: Display nth row from a table
Next Topic: copy another user tables
Goto Forum:
  


Current Time: Sun Dec 11 00:26:50 CST 2016

Total time taken to generate the page: 0.17850 seconds