I am having a file, that have to be inserted into db in text data type field. I am facing issue when the file having special characters like ( ,),. Kindly check the attached file for example.
Insert query only I have used.
Example:
Insert query only I have used.
Example:
Code:
obj=PGconn.connect(host,port'','',dbname,username,password") input="Last Cron Entry is = #50 23 * * * /ProActive/bin/Logparser_NORTEL.pl -f /Zivah/Station/CTIServer/Nortel/logs/api_`date +\%d_\%m_\%Y`.log -a >> /RemoteTShooter/Out/Content/Nortel_Parser_logs_Reports_`/sbin/ifconfig | perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1_);}'``date +\%d\%m\%Y`;touch /RemoteTShooter/Out/Status/Nortel_Parser_logs_Reports_`/sbin/ifconfig | perl -ne 'if ( m/^\s*inet (?:addr:)?([\d.]+).*?cast/ ) { print qq($1_);}'``date +\%d\%m\%Y` smartctl -Hc /dev/sda ==================== smartctl version 5.36 [i686-pc-linux-gnu] Copyright (C) 2002-6 Bruce Allen Home page is http://smartmontools.sourceforge.net/"; obj.exec("insert into hcoutputs (description) values('#{input}')")
Comment