Assign a random name

sharon95
Member Posts: 183
I have a table filled with the identification data of thousand of people (name, surname, phone number, address, ...). I have to assign a random name (name + surname) to each of them. How can I do it? thanks!
0
Best Answer
-
1) Create 2 new tables Firstname & Surname - each table should have 2 fields - ID (Integer = primary key) and Name (text)
2) Loop through your current people table and use this to populate the 2 new tables with first names and surnames
3) Loop through your people table again and for each record use the RANDOM function to generate 2 random numbers and use these 2 random numbers to GET a firstname and surname from the 2 new tables, concatenation the names and replace in your people table5
Answers
-
Create a new field.
Then create a batch (report / Codeunit) which populate data in new fields based on concatenation of name and surname field.
Thanks & Regards,
Saurav Dhyani
Do you Know this About NAV?
Connect - Twitter | Facebook | Google + | YouTube
Follow - Blog | Facebook Page | Google + Page0 -
Create a processing only report to do that. Write code inside report to append Name and Surname (Name + Surname) and then modify the record.Software Developer,
Archerpoint India Pvt. Ltd,Chennai.0 -
1) Create 2 new tables Firstname & Surname - each table should have 2 fields - ID (Integer = primary key) and Name (text)
2) Loop through your current people table and use this to populate the 2 new tables with first names and surnames
3) Loop through your people table again and for each record use the RANDOM function to generate 2 random numbers and use these 2 random numbers to GET a firstname and surname from the 2 new tables, concatenation the names and replace in your people table5
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions