SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 5th, 2003, 02:35 PM
jediwizzo's Avatar
jediwizzo jediwizzo is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 35 jediwizzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Unhappy Add data to two tables.......

Hello all you nice folks out there in the nether regions of cyberspace.

I have a issue in access that I could use help with.

I am creating a database that is proving a little tricky...
I have tables that list names if 'images' and 'museums'. this is all that is in these tables so that i can run a query that will list the names without duplicates showing in my 'orders' table/form.

The problem lies in I need to be able to have duplicates under the "images" colum in the 'orders' table but I do not want duplicates showing in the 'images' table. I also need to be able to add images to the list when i input them into the 'orders' form.

So how do i input from a form into two different tables, were one table holds no duplicates but the other allows duplicates?

Hope you can answer this for me thanks.

Jediwizzo


__________________
__________________
We bring the images on the Museum Walls into your retail store.

Reply With Quote
  #2  
Old October 7th, 2003, 11:14 AM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Add a row with the image ID to the orders table

Reply With Quote
  #3  
Old October 7th, 2003, 07:09 PM
gregory.owen@hp's Avatar
gregory.owen@hp gregory.owen@hp is offline
Maniac
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2003
Location: Sweet Home, Oregon
Posts: 548 gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 4 h 37 m 8 sec
Reputation Power: 14
I don't know exactly what you want here. If you have a table which holds a list of unique records, which you use as "Valid" values to populate another table, I don't see any reason you'd want to insert a row into the "Images" table at all.

On the other hand, If the only purpose for the "Images" table is to provide a unique listing of the values which have been entered into the "Orders" table, then you simply don't need that table at all. You can get a distinct list of images directly from the "Orders" table by using "select distinct Image from Orders"

Of course, it sounds like you are using some kind of Access form to interact with your database and I don't know how much control you have over the way select statements are worded there.

Reply With Quote
  #4  
Old October 8th, 2003, 08:21 AM
jediwizzo's Avatar
jediwizzo jediwizzo is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 35 jediwizzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Were would I put this line "select distinct Image from Orders" I am using access forms and do have limited options I think.

Reply With Quote
  #5  
Old October 8th, 2003, 08:38 AM
gregory.owen@hp's Avatar
gregory.owen@hp gregory.owen@hp is offline
Maniac
ASP Free Novice (500 - 999 posts)
 
Join Date: Sep 2003
Location: Sweet Home, Oregon
Posts: 548 gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level)gregory.owen@hp User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 3 Days 4 h 37 m 8 sec
Reputation Power: 14
I have never used Access Forms, but a quick look tells me that you should create a "Query" using this sql statement, then attach it to your listbox using the listbox properties.

Reply With Quote
  #6  
Old October 8th, 2003, 08:45 AM
jediwizzo's Avatar
jediwizzo jediwizzo is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 35 jediwizzo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Thanks Ill give that a go....

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Add data to two tables.......


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT