Problem z polem data gdy jest null |
Problem z polem data gdy jest null |
28.11.2017, 11:16:13
Post
#1
|
|
Grupa: Zarejestrowani Postów: 22 Pomógł: 0 Dołączył: 11.03.2013 Ostrzeżenie: (0%) |
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? |
|
|
28.11.2017, 11:20:14
Post
#2
|
|
Grupa: Moderatorzy Postów: 36 519 Pomógł: 6308 Dołączył: 27.12.2004 |
Pierwsze wynki z googla
https://stackoverflow.com/questions/2376608...y-or-null-value https://stackoverflow.com/questions/1417297...ct-empty-fields zas jesli twoje pole ma wartosc poprostu null to wowczas datur is null -------------------- "Myśl, myśl, myśl..." - Kubuś Puchatek || "Manual, manual, manual..." - Kubuś Programista "Szukaj, szukaj, szukaj..." - Kubuś Odkrywca || "Debuguj, debuguj, debuguj..." - Kubuś Developer |
|
|
28.11.2017, 11:34:41
Post
#3
|
|
Grupa: Zarejestrowani Postów: 22 Pomógł: 0 Dołączył: 11.03.2013 Ostrzeżenie: (0%) |
faktycznie wystarczyło:
SELECT * FROM tabela WHERE datur is null |
|
|
Wersja Lo-Fi | Aktualny czas: 26.09.2024 - 16:51 |