Re: DQL help for ALTER GROUP


I could use some help here. I have a table, TableA, with columns A and B. I have another table, TableB, with columns A, B, C, D. The values of TableA column A match the values of TableB column B.

For each of the rows in TableA-ColumnA, I need to the values of TableB-ColumnC where the values in a given row of TableA-Column-A match the values of TableB-ColumnB. There are multiple rows in TableA, and the same in TableB. I can do for a single value in TableA the following:

ALTER GROUP TableA-ColumnB-row1 ADD TableB-ColumnC-row1

To add multiple values to, again, a single vlaue of TableA I could:

ALTER GROUP TableA-ColumnB-row1 ADD TableB-ColumnC-row1, TableB-ColumnC-row2, TableB-ColumnC-row3

With a SELECT statement it could look like:

ALTER GROUP TableA-ColumnB-row1 ADD (SELECT TableB-ColumnB WHERE TableA-ColumnA = TableB-ColumnB)

But how can I loop through the ALTER GROUP to go over each of the values of TableA-ColumnB??? I tried a SELECT after “ALTER GROUP (SELECT…..) but I get an error.

Any ideas?



Leave a Reply