Skip to content Skip to sidebar Skip to footer

Why Am I Getting This Error When Creating An Sql Query In Matlab?

I'm trying to export some data from MATLAB to a database. I use a PostgreSQL database via ODBC as follows. First, I create the connection: dbConn = database('PostgreSQL30', usernam

Solution 1:

Have you tried using single quotes?

>> q = sprintf('insert into test(name) values(''%s'')', 'xxx')

q =

insert into test(name) values('xxx')

Post a Comment for "Why Am I Getting This Error When Creating An Sql Query In Matlab?"