User: editor -- 2010-04-26 << 488 490 >> |
Hits: 2641 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
How to convert columns of data into SQL statement for mysql database? I have some columns of data separated by spaces, how to convert these data into SQL insert statement. |
Input Sample: |
68257568 31 CA 68257600 1983 US 68259584 15 CA ... |
Output Sample: |
insert into ip_countries values ('68257568','31','CA'); insert into ip_countries values ('68257600','1983','US'); insert into ip_countries values ('68259584','15','CA'); ... |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open source text file 2. ctrl-h open 'replace' window * set 'replace unit' to 'Line' * set 'replace with pattern' entry to: 3. click 'Replace', done! |
Download Script: scripts/489.rst.zip |
Screenshot 1: Replace_Window |
Similar Examples: |
How to convert the daily data into a weekly data with program? (61%) How to convert the daily data into a weekly data in many text files? (59%) How to convert the data into a table with columns? (56%) How to convert binary data in many text file to hexdecimal data? (56%) How to merge columns of 2 files with the same name in different folder? (53%) How to convert all numbers from decimal to percentage? (53%) How to insert two columns into a database file separated by "|"? (52%) How to change columns in each line to specified order in text file? (50%) |
Check Demo of Advanced search and replace |
Keywords: |
mysql separated by spaces sql database ies spaces separate columns values space insert spaces separated spaces insert search into database convert database text to database insert data text to columns open source text columns |