When importing info I get two separate sets of data. One months data gets pulled in with emp no with o's in it and the next month no 0's this creates a duplicate employees. The one thing thats constant is their id no's.
I need to cleanup the data using a plsql script to join everything from the one table with the other and then deleting the redundant info.
When importing info I get two separate sets of data
One months data gets pulled in with emp no with o's in it and the next month no 0's this creates a duplicate employees.
This month: there are "o" (a letter "o") in these data
Next month: there are "0" (number zero) in these data
How do they make duplicates? I presume that "this month's o" is, actually, "this month's zero", right?
The one thing thats constant is their id no's.
If you say so.
Your eg. table
I don't see relation between this table and "sample" data you posted.
You never mentioned PERID; what are MINID and MINEMP and MAXID and MAXEMP doing here? What do these MIN and MAX mean? I see that MAXEMP = '0' || MINEMP. That would probably be "this month" vs. "next month".
If that sample table is what you currently have, what would you want to get as a result? Someone smarter than me will probably know what to do, but I don't. Perhaps, if you could provide test case (which includes CREATE TABLE and INSERT INTO several sample records that represent your current situation, as well as required output) it would be easier to assist.
Thanks for the feedback. Let me try and explain in differently. The data I have has got zero's in the employee no on certain months and no zero's the other.
Although its the same client because the id no and the other details stays the same the application sees it as two due to the employee no as a user is created on employee no's. The perid is the personal id the max and min id's and emp is the different rowids and employee numbers I get when running a select statement based on personal id's. I need a way to add the maxid to the minid per client and delete the maxid which will be the one with the zero's.