Forum Discussion
navya942
Jun 21, 2024Copper Contributor
sql query realted to null and not null values in a temp table
Hi all, 1.This is my table from that I have to select that not null values of ID1 and ID3, also select NULL value of ID2 and ID4 not null value. 2. If ID1,ID3 having both NULL and NOT NULL va...
olafhelper
Jun 24, 2024Bronze Contributor
navya942 , for me that looks more like trash data.
This query will give you a result, but I am not sure, if that is what you want:
SELECT T.colA, T.colB, T.colC, MAX(T.colD) AS ColDMax
FROM yourTable AS T
GROUP BY T.colA, T.colB, T.colC