I am working on creating sample database, EMS Data Generator (a software to create sample data) is too expensive. I tried BULK SQL to insert data into MS SQL database, I failed. I think Matlab can help me but I never did something with reading/modifying file before, I really need help (before making this thread,
Problem:
I have a text file with 1,000 rows SAMPLE.TXT:
1. Marry. William. 2000. College Student. 01/02/1989. Marry@kally.com
2. Peter. Hacker. 40000. Sales Manager. 01/02/1975. Peter@sales.com
...................
And I would like to have
Insert Into [dbo].[Employee]( FirstName, LastName, Salary, JobTitle, DateOfBirth, Email)
values('Marry','William', '2000', 'College Student', '12/02/1989', 'Marry@kally.com')
Insert Into [dbo].[Employee]( FirstName, LastName, Salary, JobTitle, DateOfBirth, Email)
values('Peter','Hacker', '40000', 'Sales Manager', '01/02/1975', 'Peter@sales.com)
..............
In the result file (RESULT.TXT)
=============
I am able to read, and save but without modification
|