Microsoft
Software
Hardware
Network
Question : msaccess 2003 table update required
Where the account number in F1 is a sub account number (a sub account number is defined as an account number with either a ".1" or ".2" suffix such as: AccountNumber.1 or AccountNumber.2) the values in F5, F6, F7 of the sub account record should be updated with the values in the same relative field of the Main Account number.
Only ".1" or ".2" are considered valid sub account numbers. If there exists a .3 or .4 no action should be taken. No changes should be made to non-sub account records or to any other fields (ie F2, F3 etc)
Before:
F1 F5 F6 F7
3000 1M15 3D24 5D12
3000.1 0 0 0
3000.2 0 0 0
3112 1 3 2
4111 2D 3E 4F
5100 0 0 0
5100.1 1M15 3D24 5D12
5100.2 1M15 3D24 5D12
After:
F1 F5 F6 F7
3000 1M15 3D24 5D12(no chg to this record)
3000.1 1M15 3D24 5D12
3000.2 1M15 3D24 5D12
3112 1 3 2 (no chg to this record)
4111 2D 3E 4F (no chg to this record)
5100 0 0 0(no chg to this record)
5100.1 0 0 0
5100.2 0 0 0
Answer : msaccess 2003 table update required
ok, use this query
UPDATE dsgl1 AS A, dsgl1 AS B SET a.MtdDocCount02 = b.MtdDocCount02
WHERE clng(Left(A.GL_Account,4))
=B.GL_Acco
unt;
Random Solutions
Making a form editable in Access 2002
vpn hangs on verifying username and password
how to fix an image in certain place of the Word document
How do I find MDI Active Child from toolbar on MDI Parent in VB.NET Winforms Application?
Hiding the mouse cursor
New lines for Javascript's Confirm in .NET
I get a error message when I reference a dll file to my C# Window application
SQL Functions
Access 2007 Update Multiple Columns with a twist
MS Access Specify Table Error