| User: editor -- 2010-04-26 |
| Hits: 79 |
| 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" 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 |
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 insert two columns into a database file separated by "|"? (52%) How to join hundreds of columns in different files into one csv file? (49%) How to convert numbers into scientific format with specified spacing? (49%) How to join every n lines into 1 line in a text file? (48%) |
Check Demo of Advanced search and replace |