Viewing 3 posts - 1 through 3 (of 3 total)
Jack,
Getting following error
Msg 8154, Level 16, State 1, Line 1
The table 'Orders' is ambiguous.
here is the script
CREATE TABLE ORDERS(OrderNo int, OrderDate datetime, Cost int, PreviousCost int, NewCost int)...
October 22, 2009 at 12:55 pm
#1069611
Here is my intial table looks like
OrderNo OrderDate Cost PreviousCost NewCost
1 ...
October 21, 2009 at 1:50 pm
#1069091
Ignore the previous question. Here is what I need.
If the orderno exists in immediate previous month, then update the previousCost column with cost other wise update the newcost column with...
October 21, 2009 at 1:23 pm
#1069073