nvl Questions
2
Solved
I'm selecting the max of a column from a table. But there is one problem: if there are no rows in the table, it returns null.
I want to use a function which will return a certain value if the res...
2
Solved
As title, I'm writing some Stored Procedure on Oracle, first I checked the version
SELECT * FROM v$version;
with result
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Product...
Cowrie asked 22/7, 2019 at 2:30
3
Solved
Good morning my beloved sql wizards and sorcerers,
I am wanting to substitute on 3 columns of data across 3 tables. Currently I am using the NVL function, however that is restricted to two columns...
8
Solved
Are there non obvious differences between NVL and Coalesce in Oracle?
The obvious differences are that coalesce will return the first non null item in its parameter list whereas nvl only takes two...
3
1
I want to write the following query as a Hibernate Criteria query:
select
to_char(nvl(ol.updated_datetime, ol.created_datetime), 'dd/mm/yyyy'), sum(discount_price)
from order_line ol
where nv...
1
Solved
Sometimes I see an nvl() function in code. In the case of Java, it looks like this:
public static String nvl(String value, String alternateValue) {
if (value == null)
return alternateValue;
re...
3
Solved
I have this table where NULL is the NULL value, not the string NULL:
MYCOL
--------
NULL
example
Why does this query not return the NULL row?
select * from example_so where nvl(mycol, '') = '';...
3
I'm trying to run the following query:
select a.*,
case when NVL (SELECT max(b.field1)
FROM b
where b.field2 = a.tbl_a_PK , 'TRUE') = 'TRUE'
then 'has no data in b'
else 'has data in b' end...
2
Solved
So I need to do a query where I need a bunch of NVL's but I need to do these in linq (if it helps the db backend is BD2 and we are using subsonic) I searched the web for "NVL linq" and didn't reall...
4
Solved
Does anyone know, why Oracle's NVL (and NVL2) function always evaluate the second parameter, even if the first parameter is not NULL?
Simple test:
CREATE FUNCTION nvl_test RETURN NUMBER AS
BEGIN
...
1
© 2022 - 2024 — McMap. All rights reserved.