What would it be the simplest way to merge a result like this from a sql query to be displayed in an asp.net gridview?
NULL Tarde Fer W. Lunes
Mañana NULL Fer W. Lunes
I need the result to look like this
Mañana Tarde Fer W. Lunes
What would it be the simplest way to merge a result like this from a sql query to be displayed in an asp.net gridview?
NULL Tarde Fer W. Lunes
Mañana NULL Fer W. Lunes
I need the result to look like this
Mañana Tarde Fer W. Lunes
Do it upstream from the UI (on the server returning the results, in other words,) and group on an ID field returning the max() field values when you want to exclude nulls.
Assuming Table
Col1 Col2 Col3 Col4
------- ------ ------ --------
NULL Tarde Fer W. Lunes
Mañana NULL Fer W. Lunes
Then
SELECT MAX(Col1) AS Col1, MAX(Col2) AS Col2, Col3, Col4
FROM YourTable
GROUP BY Col3, Col4