I have not tested this but try

UPDATE t1
SET table1.Title=table2.Title,
    table1.Body=table2.Body,
    table1.Section=table2.Section
FROM table1 t1
INNER JOIN table2 t2 ON(t1.ID = t2.ID)

I think the way you are doing it will not work
because of your placement of the join clause.

Play with that and see if it helps Phillip.

Jeremy Allen
elliptIQ Inc.

>-----Original Message-----
>From: Philip Arnold - ASP [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, February 20, 2001 9:33 AM
>To: CF-Talk
>Subject: SQL Update - Now I'm royally confused
>
>
>OK, after that SP question, and some experimentation, I've decided to start
>doing most of the work with CF, and then shift over to SPs when I know I've
>got the SQL working
>
>Anyway, I'm trying to do the update from one table to another in
>SQL using a
>JOIN - it's SQL Server 7
>
>update table1 inner join table2 on table1.ID=table2.ID
>set table1.Title=table2.Title,
>    table1.Body=table2.Body,
>    table1.Section=table2.Section
>where table1.ID in (#form.PageIDList#)
>
>This returns;
>ODBC Error Code = 37000 (Syntax error or access violation)
>[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the
>keyword 'inner'.
>
>I'm now totally confused! Maybe I'm just too tired and frazzled
>
>Philip Arnold
>Director
>Certified ColdFusion Developer
>ASP Multimedia Limited
>T: +44 (0)20 8680 1133
>
>"Websites for the real world"
>
>**********************************************************************
>This email and any files transmitted with it are confidential and
>intended solely for the use of the individual or entity to whom they
>are addressed. If you have received this email in error please notify
>the system manager.
>**********************************************************************
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to