Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Don Read
On 19-Jun-2003 Mojtaba Faridzad wrote: Please don't hi-jack threads. > Hi, > > In a docuement such as Invoice Form, we have a header and a couple of > records for the detail. In header table, Invoice# can be the PRIMARY KEY > but > in detail table, Invoice# is not unique. I think there are two

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Ken Menzel
Hi Paul, (good to hear from you!) We use (invoice number+date) number as the primary key for the header and (invoice number+body item number+date) in the body of the invoice. We do not allow the same invoice number to be reused on the same day. However they can eventually rollover (ours is a

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Mojtaba Faridzad
ay, June 19, 2003 11:43 AM Subject: Re: selecting PRIMARY KEY when there is no unique value > Mojtaba Faridzad wrote: > > >Hi, > > > >In a docuement such as Invoice Form, we have a header and a couple of > >records for the detail. In header table, Invoice# can be the

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Paul DuBois
At 11:15 -0400 6/19/03, Mojtaba Faridzad wrote: Hi, In a docuement such as Invoice Form, we have a header and a couple of records for the detail. In header table, Invoice# can be the PRIMARY KEY but in detail table, Invoice# is not unique. I think there are two solutions to choose a Primary Key (i

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Michael Conlen
Mojtaba Faridzad wrote: Hi, In a docuement such as Invoice Form, we have a header and a couple of records for the detail. In header table, Invoice# can be the PRIMARY KEY but in detail table, Invoice# is not unique. I think there are two solutions to choose a Primary Key (in MyISAM type) : 1) Add

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread PeterWR
: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 5:15 PM Subject: selecting PRIMARY KEY when there is no unique value > Hi, > > In a docuement such as Invoice Form, we have a header and a couple of > records for the detail. In header table, Invoice# can be the PRIMARY KEY b

Re: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Bruce Feist
Mojtaba Faridzad wrote: In a docuement such as Invoice Form, we have a header and a couple of records for the detail. In header table, Invoice# can be the PRIMARY KEY but in detail table, Invoice# is not unique. I think there are two solutions to choose a Primary Key (in MyISAM type) : 1) Adding a

RE: selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Mike Hillyer
guess. Regards, Mike Hillyer www.vbmysql.com > -Original Message- > From: Mojtaba Faridzad [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 9:16 AM > To: [EMAIL PROTECTED] > Subject: selecting PRIMARY KEY when there is no unique value > > > Hi, > >

selecting PRIMARY KEY when there is no unique value

2003-06-19 Thread Mojtaba Faridzad
Hi, In a docuement such as Invoice Form, we have a header and a couple of records for the detail. In header table, Invoice# can be the PRIMARY KEY but in detail table, Invoice# is not unique. I think there are two solutions to choose a Primary Key (in MyISAM type) : 1) Adding an id field ( auto_i