Field type conversion question

2002-12-12 Thread Brad Harriger
I need to create a table that will store employees that attended certain events.  I 
have two tables set up for this purpose.  One (EmpTable) stores employee demographic 
information.  The other (Events) stores information about the events (date, time, 
location, etc.)  In EmpTable, the employee name is stored in fields FirstName and 
LastName.  I would like to have a field in Events that will store multiple names with 
both fields from EmpTable concatenated into one string (i.e. FirstName LastName)  
What is the most efficient way to do this in MySQL?

Thanks,

Brad

This e-mail and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to whom they are addressed. This communication 
may contain material protected by legal privileges or statutory protections.  If you 
are not the intended recipient or the individual responsible for delivering the e-mail 
to the intended recipient, please be advised that you have received this e-mail in 
error and that any use, dissemination, forwarding, printing, or copying of this e-mail 
is strictly prohibited. If you have received this e-mail in error, please immediately 
notify us and delete the original message. Upon request, we will reimburse you for 
reasonable costs incurred in notifying us.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Field type conversion question

2002-12-12 Thread Steve Yates
On Thu, 12 Dec 2002 08:59:45 -0500, Brad Harriger wrote:

like to have a field in Events that will store multiple names with both fields from 
EmpTable concatenated into one string (i.e. FirstName LastName)  What is the most 
efficient way to do this in MySQL?


One approach is an EventAttendance table that has two fields
(eventnum, employeenum).  Then multiple employees can attend one event,
and there are no long strings running around.

 - Steve Yates
 - If you smoke after sex, you're doing it too fast.

~ Taglines by Taglinator - www.srtware.com ~


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Field type conversion question

2002-12-12 Thread Adolfo Bello
I would suggest having

 EmpTable (PRIMARY KEY=empID)
 EventsTable  (PRIMARY KEY=eventID)
 AttendantsTable (PRIMARY KEY=[empID,eventID])

From there you can build queries to find persons who attended an event
or which events a person went to.

Adolfo

 -Original Message-
 From: Brad Harriger [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, December 12, 2002 10:00 AM
 To: [EMAIL PROTECTED]
 Subject: Field type conversion question
 
 
 I need to create a table that will store employees that 
 attended certain events.  I have two tables set up for this 
 purpose.  One (EmpTable) stores employee demographic 
 information.  The other (Events) stores information about the 
 events (date, time, location, etc.)  In EmpTable, the 
 employee name is stored in fields FirstName and LastName.  I 
 would like to have a field in Events that will store multiple 
 names with both fields from EmpTable concatenated into one 
 string (i.e. FirstName LastName)  What is the most 
 efficient way to do this in MySQL?
 
 Thanks,
 
 Brad
 
 This e-mail and any files transmitted with it are 
 confidential and are intended solely for the use of the 
 individual or entity to whom they are addressed. This 
 communication may contain material protected by legal 
 privileges or statutory protections.  If you are not the 
 intended recipient or the individual responsible for 
 delivering the e-mail to the intended recipient, please be 
 advised that you have received this e-mail in error and that 
 any use, dissemination, forwarding, printing, or copying of 
 this e-mail is strictly prohibited. If you have received this 
 e-mail in error, please immediately notify us and delete the 
 original message. Upon request, we will reimburse you for 
 reasonable costs incurred in notifying us.
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php