I have a Postgres table which should be migrated to IRIS. The table has a computed column, like:
CREATE TABLE example_table (
id VARCHAR(10) PRIMARY KEY,
normalized_id VARCHAR(10) GENERATED ALWAYS AS (LPAD(id, 10, '0')) STORED
);
IRIS also has the LPAD function but I can't figure out how to achieve the same result using pure SQL DDL.
Tried this:
CREATE TABLE example_table (
id VARCHAR(10) PRIMARY KEY,
normalized_id VARCHAR(10) COMPUTECODE {
set {normalized_id} = LPAD({id}, 10, '0')
}
COMPUTEONCHANGE(id))
Got the following error:
SQL Error [400] [S1000]: [SQLCODE:.png)
.png)
.png)


.png)

