Question
Update table 1 with data from Table 2?
Ok I successfully populated my new table with data from
another table.
Now, I need to add additional data to the new (multiple) records (UPDATE) from yet another table.
I know how to kick off an update action for one record using a passed key field from a form or link (URL), but I keep getting syntax errors trying to complete the data transfer with:
<cfquery name="updatedata" datasource="somedata">
UPDATE new_table
FROM old_table
SET vendor_address1 = "Street1",
vendor_address2 = "Street2",
vendor_city = "City",
vendor_state = "StateID",
vendor_zip = "Zip",
vendor_zip4 = "Zip4",
vendor_tele = "Phone",
vendor_fax = "Fax"
WHERE old_location_ID = "PhysicalLocationID"
</cfquery>
I've tried several variations of this- sorry but what am I missing?
Thanks in advance.
newportri
Now, I need to add additional data to the new (multiple) records (UPDATE) from yet another table.
I know how to kick off an update action for one record using a passed key field from a form or link (URL), but I keep getting syntax errors trying to complete the data transfer with:
<cfquery name="updatedata" datasource="somedata">
UPDATE new_table
FROM old_table
SET vendor_address1 = "Street1",
vendor_address2 = "Street2",
vendor_city = "City",
vendor_state = "StateID",
vendor_zip = "Zip",
vendor_zip4 = "Zip4",
vendor_tele = "Phone",
vendor_fax = "Fax"
WHERE old_location_ID = "PhysicalLocationID"
</cfquery>
I've tried several variations of this- sorry but what am I missing?
Thanks in advance.
newportri
