dfincham28
asked on
SQL Syntax for an Update with a Select
I want to update a number of records using an update and a select statement. The table has a lot of columns so I don't want to have specify every single column that will be updated. The two tables I'm using have the same columns.(It is the same table in two different databases.)
I'm looking for syntax something like :
Update Database1.dbo.MyTable A1 Set (Select * FROM Database2.dbo.MyTable B1 JOIN B1.Id = A1.Id)
WHERE A1.description like 'x'
Is this possible?
I'm looking for syntax something like :
Update Database1.dbo.MyTable A1 Set (Select * FROM Database2.dbo.MyTable B1 JOIN B1.Id = A1.Id)
WHERE A1.description like 'x'
Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Why a 'B'?
What was missing from my answer?
What was missing from my answer?
sorry, I read that part only afterwards...
I have to agree, it's not possible (and would not be good practice anyhow)