Search Value In Tables

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • japuentem
    New Member
    • Jun 2007
    • 31

    Search Value In Tables

    I have two tables like this:

    Table A Table B
    1 One 1 Number One
    2 Two 2 Number Two
    3 Three 3 Number Three
    4 Four 4 Number Four
    5 Five 5 Number Five
    6 Number Six
    7 Number Seven

    and i need to find the values of Table B that not in Table A

    The result must return 6 number Six and 7 Number Seven, i used the NOT IN instruction but it doesn't work or maybe i used wrong

    Please HELP
  • voroojak
    New Member
    • Feb 2007
    • 92

    #2
    hi
    i am also a begiiner but what i see here is that nothing is same in these two columns.
    table A has the value 1 one
    tale B has the value 1 number one

    i think if you use "not in" it shouldnt give u an answer because the value of the columns are not equal.

    can you please explain a liiltle bit more. as i said i am also a begiiner but i would help if i can.

    Comment

    • hariharanmca
      Top Contributor
      • Dec 2006
      • 1977

      #3
      Originally posted by voroojak
      hi
      i am also a begiiner but what i see here is that nothing is same in these two columns.
      table A has the value 1 one
      tale B has the value 1 number one

      i think if you use "not in" it shouldnt give u an answer because the value of the columns are not equal.

      can you please explain a liiltle bit more. as i said i am also a begiiner but i would help if i can.

      can you post the qrey ("NOT IN") which you tryed?

      Comment

      • baskar050607
        New Member
        • Jul 2007
        • 1

        #4
        i think its possible by using EXCEPT statement..

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Originally posted by baskar050607
          i think its possible by using EXCEPT statement..

          i never find any difference between EXCEPT and NOT IN.

          let me to see your qrey

          Comment

          • japuentem
            New Member
            • Jun 2007
            • 31

            #6
            The error was that one table had null values and the query that contain the NOT IN instruction can't return values if have null value

            Thanks all

            Comment

            Working...