Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy changes on one table to another

Status
Not open for further replies.

davidmcolaco

Technical User
Aug 1, 2005
102
PT
Hi,

I have 2 tables with the same content, but one is linked to a form to change is values. What I need is that when something changes on table1, it copies the changes to table2, so they can always have the same content.
Is that possible?

Thanks in advance.
 

And what forces you to keep in two tables the same content?
 
Hi,

What forces me is that I have a query to select twice values of that table to insert automatically some values, and the only way I could manage to do that was to create 2 tables with same values.

Thanks
 
that doesn't make any sense to me....could you please elaborate? Have you read the Fundamentals document below?

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
The problem is that right now I need to finish up this this week and I don't have time to read now.
 
ok don't read it right now, but you still haven't explained your problem with enough detail for anyone to understand exactly what you are trying to do and how you are trying to do it so that you can get any help to accomplish it.

Leslie
 
select twice values of that table
so reference the table twice in your query with 2 different aliases:
SELECT A.value AS Value1, B.Value AS Value2
FROM yourTable AS A, yourTable AS B
WHERE A.somekey=somevalue1 AND B.anotherkey=somevalue2

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top