Hello :)
I have a table, which contains relations between, let's call them "symbols". Looks like this:
I want to prevent user from saving data when inputs 2 records like marked on the screen (symbol => symbol_to, and in another symbol_to => symbol). We ignoring type column, i want to search only symbol/symbol_to.
My only idea is to loop over every record, and for every record loop over all records and check for column values, BUT if this table grows too much, that could be not efficient - f.e. for 500 records is 500x500...
Mayby someone has another idea?
Thanks!
EDIT: another idea i came up with - get data from DW, put into temporary table in oracle, run select which is simple, and retrieve it. But mayby is a way to do this in PB?
1.count (symbol for all distinct if (symbol < symbol_to, symbol + "$$" + symbol_to, symbol_to + "$$" + symbol)) - this should be put directly in the DW?
2. dw grouping functionality - I'm not failmiar with such functionality. Is it also in the DW ?
Grouping is a datawindow functionality. It is a special datawindow style but you can also create groups for tabular or grid datawindow (menu Rows->Create group) You can group by columns, computed fields or expression. All rows that match the group specification are in one group. The next not matching row starts a new group. Because of this it is importent that you correctly set the datawindow sort! With grouping you can use aggregate functions like count only for groups, e.g count (mycol for group 1) counts the number of rows in each group of level 1 (you can have different group levels - level 2 is a sublevel of level 1).