Read from source.sql write to destiantion.sql with python script?
<p>I Have a file source.sql</p>

<pre><code>INSERT INTO `Tbl_ABC` VALUES (1, 0, 'MMB', '2 MB INTERNATIONAL', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 12, '3D STRUCTURES', '3D STRUCTURES', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 0, '2 STRUCTURES', '2D STRUCTURES', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 111, '2D STRUCTURES', '3D STRUCTURES', NULL, NULL, 1)
</code></pre>

<p>I am going to write a new file called destination.sql.It will contains:
The new file will ignore </p>

<pre><code>`INSERT INTO `Tbl_ABC` VALUES (1, dont wirte if !=0, 'MMB', '2 MB INTERNATIONAL', NULL, NULL, don't write if !=0)
</code></pre>

<p>My sql may loger than this.but positon is keep in general.
In this case the first number 0 at position[1]
and the second 0 at the position[6] (start count from 0)</p>

<p>That the results should be like this .</p>

<pre><code>INSERT INTO `Tbl_ABC` VALUES (1, 0, 'MMB', '2 MB INTERNATIONAL', NULL, NULL, 0)
INSERT INTO `Tbl_ABC` VALUES (2, 0, '2 STRUCTURES', '2D STRUCTURES', NULL, NULL, 0)
</code></pre>

<p>Anybody Here Could help me to find the way to format the source.sql file and write new file.
destination.sql</p>

<p>Thanks ..</p>
