Re: DTS Update or Insert
From: Allan Mitchell (allan_at_no-spam.sqldts.com)
Date: 03/24/04
- Next message: Allan Mitchell: "Re: import excel data error"
- Previous message: Allan Mitchell: "Re: Change sa pasword affect current DTS packages"
- In reply to: Bryan Harrington: "DTS Update or Insert"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Mar 2004 13:01:06 -0000
If the statement is issued fine and syntactically it is fine then
Do the two tables have the same values in those same attributes already?
Have you checked using a SELECT to see which rows should be being updated?
-- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Bryan Harrington" <news@psacake.com> wrote in message news:OhYTbMZEEHA.3784@TK2MSFTNGP10.phx.gbl... > Hello.. I'm building an interface of sorts, taking account data from a daily > dump to a text file, sucking it into a temp table (Interface_Accounts).. > that's not a problem. > > Once it is in the temp table, I need to then either Update the Accounts > table (if the account number already exists in the accounts table), else > Insert a new record. The update does not happen. The account balance is not > changed. > > The SQL I have is as follows: > > UPDATE Accounts > SET accounts.account_balance = interface_accounts.account_balance, > accounts.service_date = interface_accounts.service_date > FROM Accounts JOIN Interface_Accounts ON accounts.account_number = > interface_accounts.account_number > > It parses fine, SQL says it's ok, but no updates happen. I know for a fact > that data has changed. Any thoughts? > > Thanks! > >
- Next message: Allan Mitchell: "Re: import excel data error"
- Previous message: Allan Mitchell: "Re: Change sa pasword affect current DTS packages"
- In reply to: Bryan Harrington: "DTS Update or Insert"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|