Viewing 5 posts - 1 through 6 (of 6 total)
update p1 set p1.Previous_tot = p2.current_tot from Totals p1
join Totals p2 on p2.mid = p1.mid and p2.account = p1.accountand p2.sname = p1.sname and p2.mname = p1.mname and left(p2.Date,11) = left(getdate()-1,11)
where...
February 11, 2009 at 11:20 am
I think i figured it out using an update after the insert.
February 11, 2009 at 9:11 am
If I was going to insert these into a different table how would I go about getting the PrevTotal?
like this
col1 col2 ...
February 11, 2009 at 7:34 am
works great i just added isnull(T1.Total,0) - isnull(T2.Total,0) Diff.
thanks so much for the help.
February 10, 2009 at 5:15 pm
it is a varChar. I need to look into the substring i guess.
August 28, 2008 at 11:25 am
Viewing 5 posts - 1 through 6 (of 6 total)