Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

find and replace in sql between two tables??

Posted on 2008-10-23
2
Medium Priority
?
169 Views
Last Modified: 2012-05-05
Hi,
Can you help me write up a sql to find and replace?
table1(id,trigraph)
table2(cid,digraph,trigraph)

I want to replace trigraph of table1 with the digraph.
0
Comment
Question by:dkim18
2 Comments
 
LVL 39

Accepted Solution

by:
BrandonGalderisi earned 2000 total points
ID: 22790213
assuming your link between the two tables is trigraph..

update t1
set trigraph = t2.digraph
from table1 t1
join table2 t2
on t1.trigraph = t2.trigraph
0
 

Author Closing Comment

by:dkim18
ID: 31509397
Thanks much.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hopefully the following mnemonic and, ultimately, the acronym it represents is common place to all those reading: Please Excuse My Dear Aunt Sally (PEMDAS). Briefly, though, PEMDAS is used to signify the order of operations (http://en.…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Loops Section Overview
Screencast - Getting to Know the Pipeline

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question