472,145 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Multiple Entries for the same key in an access DB

Hi everyone,

i have an emp id say p12234
and an entry for this id has been made into the access DB.

now i want to add another record for the same key (there is no primary key set)

such that the output appears as :

emp_id name qty date
p12234 p 1 30/03/2007
p12234 p 2 31/03/2007

plz help to write the query for this.....
Mar 30 '07 #1
3 1155
dorinbogdan
839 Expert 512MB
Welcome to TheScripts TSDN...

Suposing that the table name is employee, execute this query:
Expand|Select|Wrap|Line Numbers
  1. Insert Into employee (emp_id, [name], qty, [date])
  2. Values ('p12234', 'p',2, '31/03/2007')
  3.  
Replace employee with your real table name.

Does it solve your problem?
Mar 30 '07 #2
Welcome to TheScripts TSDN...

Suposing that the table name is employee, execute this query:
Expand|Select|Wrap|Line Numbers
  1. Insert Into employee (emp_id, [name], qty, [date])
  2. Values ('p12234', 'p',2, '31/03/2007')
  3.  
Replace employee with your real table name.

Does it solve your problem?
Hi Sir,
Actually d scenario is I've designed 1 snacks order system. in this everyday employee in our company order for snack's qty. now in this im takin d current date. d problem is, any employee id entered for d 1st time while saving d record in d DB doesnt throw any error but if on next day if i try to enter snack's qty on same employee id, it dosnt take that data and shows a blank screen (not any error).
since there are multiple entries for d same key I've not assigned primary key to d table...

now how should I proceed??
Mar 31 '07 #3
dorinbogdan
839 Expert 512MB
Please provide your code.
Apr 2 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Usenet | last post: by
5 posts views Thread by Sammy | last post: by
3 posts views Thread by Bernard Lebel | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.