Subject In() Question
Author Check_Mail

Hello @ll,

 

I have a configuration table with stations, who can be only one order active and stations, where it isn’t so. The list contains all stations, who only one order can be active. For example, if there an order in station 2, the user cannot start an order on station 1, 2 and 3. On stations 4 it isn’t so, on station 5 only station 5 will be checked.

 

Please not with a sql statement.

 

Station, onlyone, list

1                 1        1,2,3

2                 1        1,2,3

3                 1        1,2,3

4                 0

5                 1        5

6                 0

 

The sql where station in(1,2,3) works, but not if there an variable where station in(:varname). An cursor message occurs.

 

How can I solve this? Perhaps per sql where station, the current station is 2 for example (..where station in (select station from table where onlyone …ends to 1 from 2 to 1 and ..onlyone ends while 1 is ending (station 4)..?

 

Thank you.