Sunday, November 09, 2008

People that need to adapt SQL files to isql format, which means 1 SQL command per line (No "new line" characters are not allowed) can use this great tip from waldner & prince_jammys @ Freenode #awk channel :

awk '/^--|^$/ {print; next} !/;$/ {printf("%s ", $0); next} { print }'

This comes in handy for people that are happy with MySQL integrated into their Software where suddenly the big bad Oracle comes along and you need to do bells and whistles to make it tick.

isql is a great utility that can allow you from the command line work with every datasource UnixODBC supports.

Have fun...

No comments: