How do you find the newest value in a column? Only 1 column changes values and it is not the main identifier.
(select ( t_Order_Assignment.dte_assignment )
from t_order_assignment WITH (NOLOCK)
inner join t_order_detail on t_Order_Assignment.order_detail_id = t_order_detail.Order_Detail_ID)as 'dte_assignment'
This is also set inside a much larger query so the order by clause will not work. I have tried @@identity, scope, top 1, and Last(doesn’t work). I just need the newest value in that specific column listed above.
Thanks
so are you saying this would not work??
— just saw the comment about storing dates as a string… not a good move but maybe out of your hands, so there is a cast on the order by. this has no error handling so you may want to look at that…