By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,490 Members | 1,774 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,490 IT Pros & Developers. It's quick & easy.

Complicated Append Query

P: n/a
Using A2003. I've got 2 tables: one a lookup table with 27 items, and
another table with client ID's and items from the lookup table. For
every client, there should be 27 records. However, some clients have
less than 27. Is there a way to append the missing records to this
client table?

The structure for the lookup table is like so:
ReleaseType Text(50)

The structure for the client table is:
ClientID LongInteger
ReleaseType Text(50)

Thanks for any help or advice.

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You have to use a [LEFT/RIGHT] Join in your Query.

There's a tutorial in
http://www.w3schools.com/sql/sql_join.asp
on how to work with SQL Joins.

Regards.
LCK

Nov 13 '05 #2

P: n/a
Thanks for your reply. A coworker suggested I do this:
1) create a cartesian product on ClientID/ReleaseType. That
gives all the possible combinations - 27 records for each client.

2) append that to the client table. This will append only those
combinations that are not present. The rest will not append due to
primary key constraints (ClientID and ReleaseType are primary keys in
the client table).

Seemed to work.

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.