Information générale
Forum:
Microsoft SQL Server
Titre:
Update with added value
Versions des environnements
SQL Server:
SQL Server 2005
Hi,
I try to update a file add value to the exiting value, the statement as follows:-
INSERT INTO amaster
(cmdb, cmcr, ccmdb, ccmcr)
SELECT damt + amaster.cmdb AS Expr1, camt + amaster.cmcr AS Expr2, cdamt + ccmdb AS Expr3, ccamt + ccmcr AS Expr4
FROM transact
WHERE (acctno = amaster.acctno)
I have the following error on exec.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "amaster.acctno" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "amaster.cmdb" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "amaster.cmcr" could not be bound.
Msg 207, Level 16, State 1, Line 3
Invalid column name 'ccmdb'.
Msg 207, Level 16, State 1, Line 3
Invalid column name 'ccmcr'.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement