[dba-SQLServer]A real Newbie Queston re:updating a Field in a Table

Nicholson, Karen knicholson at gpsx.net
Wed Oct 29 09:39:23 CST 2003


Here is an example - I have a prospect and a customer table.  Join them by
their common field, cust_no.
Update the field you want to update (I used udf12) to the desired value.


update dbo.prospect
set dbo.prospect.udf12='myvalue'
FROM  dbo.prospect INNER JOIN
      dbo.customer ON dbo.prospect.cust_no = dbo.customer.cust_no

-----Original Message-----
From: Klos, Susan [mailto:Susan.Klos at fldoe.org]
Sent: Wednesday, October 29, 2003 10:13 AM
To: 'dba-SQLServer at databaseadvisors.com'
Subject: [dba-SQLServer]A real Newbie Queston re:updating a Field in a
Table


I have two tables which are inner joined on two fields.  One of the tables
contains a flag field.  I want to update the flag field only where records
in the two tables are the same.
_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com


More information about the dba-SQLServer mailing list