I'm SURPRISED ! Nobody to solve my Problem ?

Results 1 to 4 of 4

Thread: I'm SURPRISED ! Nobody to solve my Problem ?

  1. #1
    Sharon Guest

    Default I'm SURPRISED ! Nobody to solve my Problem ?

    This was my first time at this site reffered by a friend i had hoped you guys could help me out but i am sorry to say that till now i got only one response, though it did not help me but thanks to Bill for a trial. <BR>Maybe if you could think of some IF ELSE,Looping some Kinda conditional logic to manipulate my tables through ASP.<BR>Something like this.<BR>For every occurance of a part number send the entire row to <BR>&#039;Table 1&#039; .If the same part number occurs for the second time send it to &#039;Table 2&#039; else send it to &#039;Table 3&#039;.<BR>Think about the above and some similar stuff.<BR>The Problem:<BR>I have a table in MS Access having many fields. <BR>The fields are Part_numbers,Office,Pool_ID,Bin_Location,ESC...etc . <BR>There are 7000 rows.Out of this 7000 rows around 2000 rows contains duplicate part_numbers.I want to remove the Duplication of part numbers. example.. <BR>Below Table name is &#039;Inventory.mdb&#039;: <BR>-------------------------------------------------------------- <BR>part_numbers, Office, Pool, Bin, ESC,... <BR>-------------------------------------------------------------- <BR>00436-60008, D400, J9013, XYZ, $500 <BR>00436-60008, D476, J9014, XYZ, $500 <BR>______________________________________________ ________________ <BR>Maximum number of repeatation of a single part_number is three. <BR><BR>SO WHAT I CAN DO IS,mearge the table i mean, i can have additional fields like Office_2,pool_2 and so on. ie... <BR>&#039;Solution.mdb&#039;: <BR>-------------------------------------------------------------- <BR>part_numbers, Office, Office_2, Pool, Pool_2, Bin, ESC . <BR>-------------------------------------------------------------- <BR>00436-60008, D400, D476, J9013, J9014, XYZ, $500 <BR>______________________________________________ ________________ <BR><BR>For getting the above (which is my requirement) i have to first create two or three tables from the inventory table and keep all the duplicate part_numbers row in different tables.Then run a query to get a common solution.mdb table. <BR>So my question is how split the &#039;first table ie.. &#039;inventory.mdb&#039; in to two or three tables on the basis of the duplicate part_numbers.Tell me if SQL alone can solve it without using ASP(even better).Else how to do it using ASP.My database is of Access. <BR>Regards and Love, <BR>Sharron Lily. <BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: I'm SURPRISED ! Nobody to solve my Proble

    sorry you haven&#039;t got the answer you wanted but it&#039;s not something we usually try to do. de-normalizing data *usually* means bad things....<BR><BR>unfortunately I&#039;ve got to pull this one on you and you won&#039;t like it, but had the DB been designed with this in mind you wouldn&#039;t even need to do it. as it is I&#039;m afraid you may be in for some serious typing work de-normalizing - sorry<BR><BR><BR>j<BR><BR>http://www.infinitemonkeys.ws/

  3. #3
    Dave L Guest

    Default RE: I'm SURPRISED ! Nobody to solve my Proble

    The answer depends on the question of how many times you need to do this.<BR><BR>If you have to do it just once then:<BR>in Access use the query wizard to do a find duplicates query. Once you have done that modify the query into a make table query and make a temporary table of the duplicates. Make another query to join the original table and the "made" table on more fields than part number. You should be able to delete from there. You need to be careful if you want to keep a particular duplicated record in the original table.<BR><BR>If you have to do it regularly then you will need to write a module which reads the table and compares data to previous values and use the .delete method

  4. #4

    Default Dave L

    Dave your solution sounds interisting.I am not very good at understanding English.Can you be more explicit.<BR>Thanks and Regards,<BR>Sharron Lily.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts