dynamobi/dynamobi — Issue #635: [FRG-237] extract function returns null for all values after the first null value
Author: dynamobi-build
Created: 2011-12-30 03:39:40+00:00
State: closed
Labels: Database, FRG

[reporter="elin", created="Mon, 20 Nov 2006 12:16:28 -0500 (GMT-05:00)"]
To repro:

create schema s;

set schema 's';

-- if null is returned first with a select, no order by

-- then all the columns returned are null

create table null_first(i int primary key, d date);

insert into null_first values(1, null), (2, DATE'1987-2-5'), (3,DATE'1998-12-3');

select * from null_first;

select extract(day from ((current_date - d)day)) from null_first;

-- if null is returned last with a select, no order by

create table null_last(i int primary key, d date);

insert into null_last values(1, DATE'2008-1-1'), (2, DATE'1999-1-5'), (3,null);

select * from null_last;

select extract(day from ((current_date - d)day)) from null_last;

-- if null is returned in the middle with a select, no order by

create table null_middle(i int primary key, d date);

insert into null_middle values(1, DATE'2008-1-1'), (2, null), (3, DATE'1999-1-5');

select * from null_middle;

select extract(day from ((current_date - d)day)) from null_middle;