Written by

Data Engineer at Institut Paoli-Calmettes
Question Jun Suzuki · Aug 9, 2022

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) :
<UNDEFINED>parseExtFrom+19^%qaqcmx
*mt("f", "1^TABLEA") :

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

Product version: IRIS 2022.1

Comments

John Bland · Aug 10, 2022

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

   John

0
Jun Suzuki  Aug 10, 2022 to John Bland

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).

0
Rodrigo Werneck  Oct 25, 2023 to Jun Suzuki

I´ve got the same error when trying to compile the query and both tables are in the same namespace.
What else can be causing this?

0
Rodrigo Werneck  Oct 26, 2023 to Rodrigo Werneck

WRC has identified as a possible uintended limitation and filed a report with development (Jira DP-426592).

0
Andreas Schneider · Aug 14, 2022

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.
Andreas
 

0
Andreas Schneider  Aug 14, 2022 to Andreas Schneider

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

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

0
Elena E  Aug 15, 2022 to Andreas Schneider

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

0