Category: ""Рационализации""

how to generate a sql script in 5 mins

by FJ  

While fiddling with my thesis on SNA, I stumbled upon sql2dot.
I liked the idea,so I decided to give it a try and spooled off the db from oracle.
Then I did a
awk -F';' '{print "("$1","$2","$3", "$4");"}' spool.txt > filename, to prepare the sql output.
Next step is to replace the brackets with "'('" and "')'" and insert "','" instead of just ",".
Generate sql script with while read line statement.
Finally on the top of the script write the sql statements for creating the table and you're done.

1 ... 10 11 12 13 ...14 ... 16 ...18 ...19 20 21