I need some help in this logic ..
I have a code snippet in SQL which results in data from a particular production data based on a hard coded data. I need to get the current date when I run the SQL ..
Select ProductionOrder, ItemNo, COUNT(ItemNo) As Item
Where Left(DTStamp,10) = '11/3/2015'
Group by ItemNo, ProductionOrder
Order by ProductionOrder
I need to replace the 11/3/2015 with a dynamic current date ... like -
SELECT Convert(varchar(10), GETDATE(),101)
How do I solve this ?