Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2012

    Unanswered: Duplicate Values Same Query

    I have read on Duplicate Values through the Query Wizard and I can't seem to get this one to work. I have Access 2007.

    I have two Columns one is called PBasis and the other is ITD ID Num:

    Column 1 -------- Column 2

    PBasis -------- ITD ID Num
    457818 ------ 454948
    511675 ------ 519978
    548113 ------ 639871
    316627 ------- 316627 <-----------Same Numbers

    In this query the 316627 is on both the PBasis and the ITD ID Num what would I put into a query to find only these results so that 316627 is the only results showing and also the vice versa of this and find everything except these two.

    Any help would be much appreciated.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    Any prospect of seing the actual SQL?
    In design mode switch the view (leftmost button under the menubar) to SQL View. Then copy and paste the 'Select.....' here.

    Are you certain there is not some rogue data causing this

    To find rows with the same values in both columns create a query. I dont use the query designer so im not certain how youd do this in QD...
    Switch to Sql view
    Select pbasis, [itd id num] from mytable
    Where pbasis = [itd id num]
    Change mytable to whatever your table is called
    Then run the query

    Incidentally id strongly reccommend that you drop the idea of using spaces in your column table names. Because you have used spaces yoj have to qualify / delimit the names in a query using square brackets. Whether you use CamelCase or underscores is irrelevan.
    But whatever you do do be consistant
    Last edited by healdem; 08-28-12 at 03:38.
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

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