Informix to Postgres Script
February 7, 2003
>>Script Language and Platform: Bash - Sed
Author: Vasilis Ventirozos
sqlparser File Table Script Code: #!/bin/bash if test $# -ne 2 then echo "usage: sqlparser <File> <Table>" exit; fi echo "COPY "$2" FROM stdin;" >$1.pg cat $1|sed ''s/|$//'' | sed ''s/,/\./g'' |sed -e ''s/|/ /g'' >>$1.pg echo "\." >>$1.pg echo "" echo "Transform Complete to upload run cat $1.pg |psql <SERVER>" echo ""
Disclaimer: We hope that the information on these script pages is
valuable to you. Your use of the information contained in these pages,
however, is at your sole risk. All information on these pages is provided
"as -is", without any warranty, whether express or implied, of its accuracy,
completeness, or fitness for a particular purpose...
Back to Database Journal Home