Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

Easy question on UPDATE
I have one field  organization_operati
ng_name that is on two tables vendor an
d
vendor_loc

I want to update the vendor name to the vendor_loc name

I tried this but get errors...


update vendor_loc
set  organization_operati
ng_name = vendor. organization_operati
ng_name
where  organization_operati
ng_name like 'DO NOT%'

Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'vendor' does not match with a table name or alias name
used in the query.

vendor is a valid table name...so I must be missing something.

jeff


--
Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
Jeffrey Sheldon via webservertalk.com
07-27-05 04:37 PM


Re: Easy question on UPDATE
See Example C under UPDATE in Books Online, and also "Changing Data
Using the FROM Clause".

Simon


Report this thread to moderator Post Follow-up to this message
Old Post
Simon Hayes
07-27-05 04:37 PM


Re: Easy question on UPDATE
thanks Simon,

the lightbulb went off....

Simon Hayes  wrote:
>See Example C under UPDATE in Books Online, and also "Changing Data
>Using the FROM Clause".
>
>Simon


--
Message posted via http://www.webservertalk.com

Report this thread to moderator Post Follow-up to this message
Old Post
Jeffrey Sheldon via webservertalk.com
07-27-05 04:37 PM


Re: Easy question on UPDATE
UPDATE Vendor_Loc
SET  organization_operati
ng_name
= (SELECT  organization_operati
ng_name
FROM Vendors
WHERE  organization_operati
ng_name LIKE 'DO NOT%');

You would never use the proprietary UPDATE .. FROM syntax because the
results are unpredictable.  It will fail to discover cardinality
violations, does not port, and depends on the physical arrangment of
the data. .


Report this thread to moderator Post Follow-up to this message
Old Post
--CELKO--
07-28-05 02:24 PM


Sponsored Links





Last Thread Next Thread
Post New Thread

Microsoft SQL Server forum archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 12:25 PM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006