Home » SQL & PL/SQL » SQL & PL/SQL » NULL ???
NULL ??? [message #10500] Mon, 26 January 2004 23:43 Go to next message
resy
Messages: 86
Registered: December 2003
Member
hi thanx a lot.
this query is very much suit for my request.

SELECT COUNT(*)
FROM tbsd_prud_params
WHERE UPPER (NVL (prud_value_type, '-NULL')) LIKE 'C%'
AND UPPER (NVL (prud_param_name , '-NULL')) LIKE '%'
AND UPPER (NVL (prud_param_id, '-NULL')) LIKE '%'
/

can u just explain me- how it takes '-NULL'?

thanx again.
Re: NULL ??? [message #10507 is a reply to message #10500] Tue, 27 January 2004 07:02 Go to previous message
sverch
Messages: 582
Registered: December 2000
Senior Member
'-NULL' is literal, that substitute NULL value of the column. You will never see it returned by your query because '-NULL' is not LIKE 'C%'
or '%'.

You can check youself by
SELECT NVL(prud_value_type, '-NULL')WHERE
prud_value_type IS NULL;

If you have NULLs in prud_value_type youl'get
-NULL
Previous Topic: Matrix report sql outer ranges
Next Topic: Users from SQLNavigator
Goto Forum:
  


Current Time: Thu Apr 25 06:53:58 CDT 2024