RE: Update Query with Inner join

RE: Update Query with Inner join

 

  



Syntax looks ok. Are you trying to run this in Enterprise Manager??

If so, try using Query Analyzer instead. It's not as helpful when building
queries, but it handles all the T-SQL syntax variations.


Thanks
Phillip Carter
Ph: +61 3 9235 1691


-----Original Message-----
From: Renga [mailto:mssqldba-ezmlmshield-x97616294.[Email address protected]
Sent: Friday, 30 July 2004 11:39 AM
To: LazyDBA Discussion
Subject: Update Query with Inner join


Hi,

CavTitle
========
RecID Title
------ ------------
1 FreeHold-99
2 FreeHold-999
3 Lease-50

CaveatsData
============
RecID Title OTHERFIELDS
------ ------ -----------
1 <NULL> SOME DATAS
2 <NULL> SOME DATAS
3 <NULL> SOME DATAS

UPDATE CaveatsData SET CaveatsData.Title = CavTitle.Title
FROM CavTitle INNER JOIN CaveatsData
ON CavTitle.RecId = CaveatsData.RecId

I have two tables having RecId for relationship, Want to fill the
CaveatsData.Title when I run the aboce query, result is correct but SQL
server displays an error message.

"The Query Designer does not support the Optional FROM clause SQL
construct."

what the right syntax ? pls..

warm rgds,
P.Renga




---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY Website :
http://www.LazyDBA.com To unsubscribe:
http://www.lazydba.com/unsubscribe.html
For additional commands, e-mail: mssqldba-[Email address protected]


IMPORTANT DISCLAIMER - THIS MAY AFFECT YOUR LEGAL RIGHTS:

Because this document has been prepared without consideration of any
specific clients investment objectives, financial situation or needs,
a Bell Potter Securities Limited investment adviser should be
consulted before any investment decision is made.

While this document is based on the information from sources which
are considered reliable, Bell Potter Securities Limited, its directors,
employees and consultants do not represent, warrant or guarantee,
expressly or impliedly, that the information contained in this document
is complete or accurate.

Nor does Bell Potter Securities Limited accept any responsibility to
inform you of any matter that subsequently comes to its notice, which
may affect any of the information contained in this document.

This document is a private communication to clients and is not intended
for public circulation or for the use of any third party, without the
prior approval of Bell Potter Securities.


Disclosure of Interest: Bell Potter Securities Limited receives commission
from dealing in securities and its authorised representatives, or introducers
of business, may directly share in this commission. Bell Potter Securities
and its associates may hold shares in the companies recommended.

Bell Potter Securities Limited ABN 25 006 390 772 AFS Licence No. 243480

MS Sql Server LazyDBA home page