Menu

#6 INSERT INTO... (SELECT ...) interpretted wrongly?

open
nobody
None
5
2003-04-22
2003-04-22
No

Sir,
There is a problem when I write a query like the following,

INSERT INTO my_table (field1, field2)
(SELECT :FieldID, field2 FROM my_table
WHERE field1 = :AnotherID)

the input for the query, obviously, is the entire object
and not a single field.

The generated XXXdb.cc file has a wrongly interpretted
string in the corresponding create_rs_FUN(), which reads
something like,
"INSERT FROM my_table WHERE field1 = :AnotherID)"

Further the function's signature also requires an iterator.

Thanking you in advance.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB