Professional Web Applications Themes

query failing? - MySQL

Hi, I have 2 tables, and they have 2 columns in common (straat and huisnr, both char). The query should give straat and huisnr from table1 where the same huisnr isn't there in table2. My query is: select straat, huisnr from hvw, woningen where woningen.straat = hvw.straat and woningen.huisnr not in (select huisnr from hvw) The error says there's something wrong in (select huisnr from hvw), but I don't understand what. Thank you for helping. Huub...

  1. #1

    Default query failing?

    Hi,

    I have 2 tables, and they have 2 columns in common (straat and huisnr,
    both char). The query should give straat and huisnr from table1 where
    the same huisnr isn't there in table2. My query is:

    select straat, huisnr
    from hvw, woningen
    where woningen.straat = hvw.straat and woningen.huisnr not in (select
    huisnr from hvw)

    The error says there's something wrong in (select huisnr from hvw), but
    I don't understand what.

    Thank you for helping.

    Huub
    Huub Guest

  2. #2

    Default Re: query failing?

    On Apr 1, 4:26 pm, Huub <"v.niekerk at hccnet.nl"> wrote: 

    Look at ways of employing the following syntax:

    LEFT JOIN ... WHERE ISNULL()

    strawberry Guest

  3. #3

    Default Re: query failing?



    Thank you. I got a nice resultset, but is this version dependent (I'm
    running v. 4.0.24)?
    Huub Guest

Similar Threads

  1. cf7 failing on os 10.4.6
    By bucktown in forum Coldfusion Server Administration
    Replies: 9
    Last Post: May 8th, 10:26 PM
  2. CF6.1 to CF7 - remoting failing on second query!
    By djhmateer in forum Coldfusion Server Administration
    Replies: 1
    Last Post: April 8th, 02:22 AM
  3. vacuum is failing
    By Lonni J Friedman in forum PostgreSQL / PGSQL
    Replies: 2
    Last Post: January 5th, 12:27 AM
  4. Backup failing
    By Jay in forum AIX
    Replies: 2
    Last Post: January 20th, 02:36 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139