Recent posts:
Recent replies:

The above solution is great if you’d like to keep the list in each record of one table. Depending on the nature of the data in your application, another option is to “normalize” the data a bit and create a separate table for the “numDossiersMER” values and link them back to the original “Titre” table as follows.

Convert the planned updated table from this:

User.TestList.Data.Titre

numTitre

millesime

codeProduit

numDossiersMER (list)

1

2021

X

1  2  3

2

2021

X

4  5  6

3

2021

X

4  2  3

4

2022

X

2  5  7  8

To the following 2 normalized tables

User.TestList.Data.TitreNew

Id (IRIS)

numTitre

millesime

codeProduit

1

1

2021

X

2

2

2021

X

3

3

2021

X

4

4

2022

X

User.TestList.Data.DossierMER

Id (IRIS)

titreID

numDossierMER

1

1

1

2

1

2

3

1

3

4

2

4

5

2

5

6

2

6

7

3

4

8

3

2

9

3

3

10

4

2

11

4

5

12

4

7

13

4

8

The “id (IRIS)” in each table is the “ROWID” assigned by IRIS as each entry is created in the table.

Using these two tables, the following “JOIN” query will get the results to be formatted as you like:

select numTitre, millesime, codeProduit, numDossierMER from User_TestList_Data.TitreNew t JOIN User_TestList_Data.DossierMER d on d.TitreId = t.id

Please note that this “normalized” solution is great if the “numDossierMER” values can be shared among various “Titre” records as shown in my made-up example above.

Sample code here:

Class User.TitreNew Extends (%Persistent, %Populate)
{ 
Property numTitre As %Integer; 
Property millesime As %Integer; 
Property codeProduit As %String; 
Index titreIdx On (numTitre, millesime, codeProduit) [ PrimaryKey ]; 
}
Class User.DossierMER Extends (%Persistent, %Populate) 
{ 
Property titreID As %Integer; 
Property numDossierMER As %Integer; 
}

(Please excuse the formatting)

Followers:
Following:
Jean has not followed anybody yet.
Global Masters badges: