Jun Suzuki · Aug 9

SQL : ROUTINE ERROR when inserting from another table

Following the documentation to insert into tableA from tableB in the SQL query box from the Management Portal :

INSERT INTO tableA (col1, col2)
SELECT col1, col2
FROM tableB

This straightforward query raises the following error :

Error #5475: routine compilation error : %sqlcq.TESTuNAMESPACE.cls305. Errors: %sqlcq.TESTuNAMESPACE.cls305.cls
ERROR: %sqlcq.TESTuNAMESPACE.csl305.1(14) :
*mt("f", "1^TABLEA") :

Could someone help me decipher this error message ?
Thanks for your help.

Product version: IRIS 2022.1
0 219
Discussion (5)4
Log in or sign up to continue

IF tableb is a linked table from another namespace, you will get a failure like this.


Both tables belong to the same namespace TEST_NAMESPACE.

Is there a chance this raises an error because of the content of the strings in one of the columns ? E.g : if the string is too long (though it's capped to max length 2000) or special characters are in it (like single quotes that might interfere with SQL queries).

I tried it with a small example:

I could not find any problem. Generally this variant works from my point of view.

Exceute a "PURGE CACHED QUERIES" and retry, maybe this will help.


By the way, why is SQL not available for selection in the codesnippets?

isn't SQL a first class citizen on the iris dataplatform?? ;-)

Hey Andre, thank you for mentioning that!  We  have this planned and will add SQL there soon!