Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Append querie to multiple table

Posted on 1998-06-03
1
Medium Priority
?
136 Views
Last Modified: 2010-04-06
I want to use an append querie, but I don't know how to design it because the data I have to add belong to more thant one table. Ex.: I want to add a new client in the "Client" table, and add at the same time more info on him in the "Caracteristics" table. How can I add my info so the relations between my table are respected (primary key and foreign key).
0
Comment
Question by:pjroy
[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
1 Comment
 
LVL 1

Accepted Solution

by:
Marcius earned 160 total points
ID: 1350112
If you want to add information from another table into an append statement, you have to add sub-queries. See below...

update client
set name = (select name
            from characteristics ch, client cl
            where ch.keyvalue = cl.keyvalue)
where keyvalue = (select keyvalue
                  from characteristics ch, client cl
                  where ch.keyvalue = cl.keyvalue)

Or something like that... I think that should allow you to reference other tables from within your append query, thus allowing you to check key values etc.

As for adding data into two tables in the same query, I really don't think that can be done. Why not use two queries ? It will make your life much easier :)
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

715 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