| User: editor -- 2010-04-26 << 488 490 >> |
| Hits: 325 |
| 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 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%) How to join hundreds of columns in different files into one csv file? (49%) |
Check Demo of Advanced search and replace |
| Keywords: |
| mysql sql separated by spaces database ies spaces columns values space para insert spaces separated spaces insert search into database insert data search and replace convert convert text replace convert insert text |