Solved

update with where and another select - doubt

Posted on 2012-04-04
2
266 Views
Last Modified: 2012-04-04
Hello Guys

I have a table with prod_code and supplier_code.

I want to update my main table only when my prod_code and supplier_code is found in my table B

I am having doubt to assemble this

update siaprod set pro_pven where exists (select * from table B)

my siaprod has two field that has in table B

how can I do this?

Thanks
0
Comment
Question by:hidrau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
wdosanjos earned 500 total points
ID: 37806822
Please try:
update siaprod
 set pro_pven = << value to update >>
from siaprod s
inner join tableB b on s.prod_code = b.prod_code and s.supplier_code = b.supplier_code

Open in new window

0
 
LVL 1

Author Closing Comment

by:hidrau
ID: 37807390
thanks very much
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

690 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