[Interest] QSqlQuery... bindValue does not work for CREATE TABLE .... AS SELECT....
Guido Seifert
wargand at gmx.de
Tue Mar 10 20:06:57 CET 2015
Hi,
just 'discovered' that bindValue does not seem to work with CREATE TABLE statements. One could ask, why would anyone want to use
a bound value in a CREATE TABLE statement. Here my query:
> CREATE TEMP TABLE selectseriestable AS SELECT title FROM titlegroup,title WHERE titlegroup.seriesID=(SELECT
> seriesid FROM series WHERE series=:series AND version=:version) AND titlegroup.titleID=title.titleID;";
Works fine when I replace :series and :version with concrete values. Now the question is... is this supposed to work? Is it a bug?
Or should it be ignored as some strange fringe use case and at best be documented?
Ok, there is also the remote possibility that I overlooked something or made a mistake. ;-)
The database I currently use is postgresql.
Guido
More information about the Interest
mailing list