Solved

Append querie to multiple table

Posted on 1998-06-03
1
131 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
1 Comment
 
LVL 1

Accepted Solution

by:
Marcius earned 40 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 158
Delphi - replicating a form 8 76
When i run adoquery my application freezes 26 166
TEMBEDDEDWB how can i change its user agent ? 8 58
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

803 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