Page 1 of 1

Help with logic

Posted: Tue Jan 27, 2009 4:24 pm
by Hope
Hi
The data looks in a file looks like this

Acct_No Site
111 1000
111 1100
111 1200
111 1300
222 1100
222 1300
333 1300
444 1000
444 1300
555 1000
555 1100

I have to check if Acct_No exists in all the 4 sites 1000,1100,1200,1300 .

ex 111 is there in all Sites so I dont want this record in my out put file
222 doesn't exist in Sites 1000 and 1200 so my out put should have

222 1200
222 1000

so overall my Output file should look like this.
Acct_No Site
222 1000
222 1200
333 1100
333 1200
333 1000
444 1100
444 1200
555 1200
555 1300

Please suggest.

Re: Help with logic

Posted: Tue Jan 27, 2009 11:44 pm
by jib
Hi Hope,

Though I dont have a solution, here is one suggestion. Creata an additional file (File B) containing 4 sites (1000, 1100, 1200, 1300). Make a full outer join between your source file (File A) and file B on the site and check the output which may help to get the required output by the using a filter/transformer.

Posted: Wed Jan 28, 2009 1:04 am
by ray.wurlod
Server job (as posted) or parallel job (as marked)?

Posted: Wed Jan 28, 2009 9:21 am
by Sainath.Srinivasan
Count rows < 4 => write to target