0
I’m trying to pass a script for creating and inserting data from a Firebird database to Postgresql, but in some tables there is a syntax error, I am using the SQL Manager Interbase & Firebird tool to generate *.sql files from my Firebird database tables. I have tried via CMD to send the files to the bank through the following command:
psql -h host -p 5432 -U postgres -d database -f (File location *.sql)
but the following error returns me:
psql:C:/Backup/Script/CONTROLEIMPRESSOES.sql:573: ERROR: column "DATA" is of type date but expression is of type integer
LINHA 6: (163, 6, 2007-02-01, 29138, 31432, 2294, 160.58, 31388, 33...)
DICA: You will need to rewrite or cast the expression
So I went through pgAdmin and the only way to insert this into the bank was to put the date between "2007-02-01"
.
My question is, how can I generate a *.sql file where dates already come in parentheses, so you don’t need to change row by row by adding ""
on each date.
Thanks for the Notepad++ tip, if it fit perfectly for what I needed
– R.Santos