Tuesday, December 2, 2014

SQL View: Show NULL until all "orders" have the same "orderstate"


SELECT OrderID,
MIN(CASE WHEN OrderSTATE = 1 THEN 1 ELSE NULL END) AS OrderSTATE
FROM Table
GROUP BY OrderID





Please Mark This As Answer if it solved your issue

Please Mark This As Helpful if it helps to solve your issue

Visakh

----------------------------

My MSDN Page

My Personal Blog

My Facebook Page


No comments:

Post a Comment