| Author |
Message |
softworksgroup
Joined: 02 Apr 2012 Posts: 2
|
Posted: Tue Apr 03, 2012 12:31 am Post subject: Gender-Name Dependency |
|
|
Is there a way to choose a gender value based on the gender of the name that has been chosen? I did see a reference to using a plug-in for this on the SQL Data Generator 1 forum, but I'm wondering if it is possible without a plug-in or creating a custom generator.
I do have a "names" table available in a sample data DB where the association between names and genders exist. Specifically, the source table has a "NameType" (first, last), "Gender" (male, female) and "Name" (Bob, Peter, Johnson, Obama, etc.) column.
I see how I can assign the "name" column from the source query into the FirstName, MiddleName, and LastName columns in the target table, but not how to choose a name type nor how to assign the gender value from the same source record.
Is there a way to do this?
Thanks |
|
| Back to top |
|
 |
Brian Donahue
Joined: 23 Aug 2004 Posts: 6369 Location: Red Gate Software
|
Posted: Wed Apr 04, 2012 12:42 pm Post subject: |
|
|
Hi,
This still comes down to the same basic problem that you can't derive data from one field in a row of data and apply it to another field in the same row. So the best workaround if you want to use dynamic logic to assign gender would be the Ruby Generator.
If you wanted to do it without Ruby, you could crate a table or CSV with one column having names and another having genders and use the SQL or CSV table import generators. _________________ Brian Donahue
Technical Support
Red Gate Software Ltd.
44 (0)870 160 0037 ext 8521
US and CAN 1-866-RED GATE ext 8521 |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group