This is my 2nd day using SQL so please bear with me. I was able to write this to get me started:
Select
id,
serial,
ReceivedDate,
location,
RequestedService,
subject,
Customer
From
Place.Table
WHERE(RecievedDate) is not null
I am wondering how to:
- also filter the empty out of [RecievedDate]
- add a computed "Turn" column where from [RequestedService] Bronze = 7, Silver = 5, Gold = 3
- add a computed "ShipDate" column where the [Turn] value is added to [RecievedDate] as workdays only
Do you have a table of non-work days? Or do you just want to exclude weekends (which might give you issues with July 4, Christmas, etc.)?
--add a computed "ShipDate" column where the [Turn] value is added to [RecievedDate] as workdays only --pending response
Select
id,
serial,
ReceivedDate,
location,
RequestedService,
subject,
Customer,
turn
From
Place.[Table]
cross apply (
select case RequestedService when 'Bronze' then 7 when 'Silver' then 5 when 'Gold' then 3 end as turn
) as ca
WHERE RecievedDate <> ''
No table right now for non work days but the solution worked for me, thank you!