We propose that there is a one-dimensional ISY array consisting of 3 elements of the same type, 'X', 'Y', 'Z'. And, there is a one-dimensional ISA array consisting of 2 elements of the same type: "A", "B". Similarly, the text attribute c_atr and the date type attribute c_data.

$ISY=ARRAY('X','Y','Z') $ISA=ARRAY('A','B') 

There is a condition y1): If, in the set c_atr there is an element "A" and on this line in the set c_data the date is LESS 01.06.2018 then replace with 'X'.

There is a condition y2): If, in the set c_atr there is an element "A" and on this line in the set c_data the date is MORE 01.06.2018 then replace with 'Y'.

There is a condition y3): If, in the set c_atr there is an element 'B', then replace it with a 'Z'.

Question: B1 ): How to check if there is an element from the c_atr attribute in the ISA array?

Question: B2 ): How do I pull out an indexed element from an ISY array?

Question Q3 ): How to fill the arrays ISY and ISA? (off topic, but interesting to know for the future)

 CASE WHEN У1 В1 THEN В2 WHEN У2 В1 THEN В2 WHEN У3 THEN В2 END 
  • What kind of database are you talking about? The syntax for declaring arrays is more like some kind of imperative PL (for example, php), and not a DBMS. In what form are these arrays in a DBMS? If it is suddenly postgresql (what the plsql label suggests, although it is for oracle) then use the appropriate array functions postgresql.org/docs/9.6/static/functions-array.html - Mike

0