This is a SQL Server question
I have 3 records with data: (the fields filled with dots are empty!)
NAME | FIELD1 | FIELD2 | FIELD3
blabla | . | b | .
blabla | a | . | .
blabla | . | . | c
Now I want the output to show just one row like this:
blabla | a | b | c
I'm not sure if it has to be a Case or Group or what else
How can i accomplish this?
You can use aggregate function for example max
select name,max(FIELD1) as FIELD1, max(FIELD2) as FIELD2, max(FIELD3) as FIELD3
from tab
group by name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With