The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Hrm, SQL query help. by abaron 2007-05-09 13:38:44
I have two tables, let's call them table1 and table2. Table1 is a list of strings. Table2 is huge and has a ton of fields, one of which is a corresponding field to table1. I want to write a query that will show me everything in table1 that's not in table2...

For a point of reference I'm using access for this query but I could also use brio.
[ Reply ]
  Okay, so you have a field in T2 that corresponds by merlin2007-05-09 13:43:03
    Trying now. by abaron2007-05-09 13:48:44
      You can always try indexing the relevant columns by merlin2007-05-09 13:50:10
      Did it work? (n/t) by merlin2007-05-09 16:24:11
  One quick shot at it. by CynicalRyan2007-05-09 13:44:15
    "Negative" joins are possible. You just do by merlin2007-05-09 13:45:50
      Thanks for the info. by CynicalRyan2007-05-09 13:53:14
    actually... by ricochetv12007-05-09 13:50:35
      NOT IN () is BAD!!!!!! by merlin2007-05-09 13:51:40
        I guess... by ricochetv12007-05-09 13:57:45
          Yes, true, but in general outer joins outperform by merlin2007-05-09 13:59:37
            IN() is quite useful in some circustances though, by Scirocco2007-05-09 14:04:27
              Excellent point. Let me rephrase: by merlin2007-05-09 14:06:31
                It's actually a case of mis-optimitization. by staticsan2007-05-09 16:09:11
          JOINs are pretty basic SQL, IMO (n/t) by CynicalRyan2007-05-09 14:00:14
            Yes, but they can get complex very quickly. by merlin2007-05-09 14:03:17
              Tell me about it.. by CynicalRyan2007-05-09 14:04:00
  you may like this one by dennismv2007-05-09 15:25:19
    That's exactly what I was going to post. (n/t) by staticsan2007-05-09 16:06:33
    That's essentially what I posted. by merlin2007-05-09 17:46:31
      oh good.. I didn't see it before I posted (n/t) by dennismv2007-05-09 21:01:10
  Thanks for all the advice folks. by abaron2007-05-09 15:42:09
  Can you use "not exists" in your flavour of SQL? by Danu2007-05-09 16:23:20

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)