Hello I'm pretty new at SQL Server and I've got a problem on my home work that's killing me, this is my final problem on the home work and for some reason I'm struggling with this last question.

The question goes like this:

> 
> Use the UNION operator to generate a result set consisting of three columns from the Orders table: 
>  ShipStatus A calculated column that contains a value of SHIPPED or NOT SHIPPED
>  OrderID The OrderID column
>  OrderDate The OrderDate column
>  If the order has a value in the ShipDate column, the ShipStatus column should contain a value of SHIPPED. Otherwise, it should contain a value of NOT SHIPPED.
>  Sort the final result set by OrderDate.
> 
> 
> 

Here is what I've got so far but it just doesn't seem to work.

`SELECT OrderID,OrderDate
FROM Orders
UNION
SELECT ShipDate AS ShipStatus
FROM Orders
IF ShipDate IS NULL THEN ShipDate = 'Not Shipped'
ELSE
ShipDate = 'Shipped'`

I don't want the exact answer because I'd like to figure it out but a nudge in the right direction would be greatly appreciated!

UPDATE---------

Hey guys thanks for the help!
With a combination of everyones help I figured it out.

Here was the code that ended up working.

`SELECT OrderID, OrderDate, 'SHIPPED' AS ShipStatus 
FROM Orders 
WHERE ShipDate IS NOT NULL
UNION
SELECT OrderID, OrderDate, 'NOT SHIPPED' AS ShipStatus
FROM Orders
WHERE ShipDate IS NULL;`