Seems there is an issue with Beta 24.1.113 and Fortnox when calling a stored table @inmemorystorage inside a loop:
--
-- Case with DataDictionary : works!
--
create or replace table test@inmemorystorage
as
select *
from Calendar@DataDictionary
limit 10
select * from test@inmemorystorage
declare
my_query text;
begin
for r in
( select *
from test@inmemorystorage
)
loop
my_query := my_query || 'my text' || r.Day_In_Week;
end loop;
--
dbms_output.put_line(my_query);
end;
--
-- Case with Fortnox : raises itgensql151 error.
--
create or replace table accounts@inmemorystorage
as
select *
from Accounts@fortnox
where Active = true
;
select *
from accounts@inmemorystorage
declare
my_query text;
begin
for r in
( select *
from accounts@inmemorystorage
)
loop
my_query:= my_query || 'my text' || r.Description ;
end loop;
--
dbms_output.put_line(my_query);
end;
Error:
itgensql151:
Parse error on line 6 at column 42:
Unknown field or parameter ‘R.DESCRIPTION’.
Possible valid alternative symbol names: R.Description.
The fields need to be named as to be found in the loop statement:
declare
my_query text;
begin
for r in (select Description as Description from accounts@inmemorystorage)
loop
my_query:= my_query || 'my text' || r.Description ;
end loop;
dbms_output.put_line(my_query);
end;
itgenrst004
The type of the actual data must match the data type of the column ‘ACCOUNT’ in ‘VOUCHERLINES’.
Ensure that the actual data type (çurrently ‘String’) in row #1 is cast to the data type (current ‘int32’).
A fix for the naming issue described in this topic will be shipped with 24.1.122-BETA. This release is scheduled for availability early in the week of July 3, 2025.
Included in this build are also a number of other improvements due to the new naming and recognition algorithm for identifiers in SQL and PSQL.