Mam problem z wykonaniem selecat dla wierszy z datą która jest nie wpisana.
Jest tabela: w której:
nrkro character(14) NOT NULL,
datur date,
W podglądzie mam wiersze np:
nrkro | datur |
005070936501 ||
AT007530709 |2005-01-15|
Nie mogę wyświetlić żadnego wiersza, który ma pole datur puste
Robię:
select * from tabela where datur=null
select * from tabela where datur=''
select * from tabela where datur=""
select * from tabela where datur=' - - '
select * from krowy where to_char(datur, 'YYYY-MM-DD')=''
select * from krowy where to_char(datur, 'YYYY-MM-DD')=' - - '
select * from krowy where to_char(datur, 'YYYY-MM-DD')=null
nic z powyższego nie działa tzn wynik jest pusty
Jakieś pomysły?
Pierwsze wynki z googla
https://stackoverflow.com/questions/23766084/best-way-to-check-for-empty-or-null-value
https://stackoverflow.com/questions/14172978/postgresql-select-empty-fields
zas jesli twoje pole ma wartosc poprostu null to wowczas
datur is null
faktycznie wystarczyło:
SELECT * FROM tabela WHERE datur is null
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)