hi,
i currently have two fields in my table (prodid, status) if the Status is 'A' for a Prodid then i need to set all Statuses for that ProdId to 'A' else leavealone. Example below:
ProdId: Status:
1 A
1 I
1 B
2 I
3 I
The results i require as:
ProdId: Status
1 A
1 A
1 A
2 I
3 I
Just cant seem to change it for the specific ProdId. Any assisstance greatly appreciated. thanks in advance guys
Manipulation of data
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 822
- Joined: Sat Sep 17, 2005 5:25 pm
- Location: USA
If there's no order to the Status data, meaning you could get something like this:
5 I
5 B
5 B
5 A
Then it seems to me you'll need to make two passes through the data. You could use a hashed file that you wrote to and read in the same transformer, to build a list of ProdIds and record if you ever saw an 'A' in the first pass. Then a second pass to use the hashed lookup to determine if any given ProdId should get all A's or be left alone.
5 I
5 B
5 B
5 A
Then it seems to me you'll need to make two passes through the data. You could use a hashed file that you wrote to and read in the same transformer, to build a list of ProdIds and record if you ever saw an 'A' in the first pass. Then a second pass to use the hashed lookup to determine if any given ProdId should get all A's or be left alone.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers