Berkeley CSUA MOTD:Entry 30215
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/05/25 [General] UID:1000 Activity:popular
5/25    

2004/5/13-14 [Computer/SW/Database] UID:30215 Activity:high
5/12    SQL question. Let's say I want to perform an outer join, like
        "SELECT a.column FROM a LEFT OUTER JOIN b ON a.column=b.column
         WHERE b.column='hello'"
        and I get a list of column from table a. But the following doesn't
        work where I want to delete all of the rows in a selected by the above:
        "DELETE FROM a LEFT OUTER JOIN b ON a.column=b.column
         WHERE b.column='hello'"
        How do you get around this? Thanks.
        \_ Your select statement is equivalent to
           select a.column from a.column='hello'.
           perhaps you're joining on a different column?
           \_ sorry, yes, all columns are unique, I forgot to make it clear.
              So if they're all unique column how would this be done? ok thx
              \_ You're saying the solution below doesn't work?
        \_ I think you want something more like
           DELETE FROM a WHERE a.col=b.col AND b.col2="hello".
           \_ Wouldn't you need to do
              DELETE FROM a WHERE a.col IN
                (SELECT col FROM b WHERE b.col2='hello')
              -geordan
        \_ why are you left outer joining and then filtering out the stuff
           that don't have a match in b?
2025/05/25 [General] UID:1000 Activity:popular
5/25    

You may also be interested in these entries...
2013/4/9-5/18 [Computer/SW/Languages/C_Cplusplus, Computer/SW/Apps, Computer/SW/Languages/Perl] UID:54650 Activity:nil
4/04    Is there a good way to diff 2 files that consist of columns of
        floating point numbers, such that it only tells me if there's a
        difference if the numbers on a given line differ by at least a given
        ratio?  Say, 1%?
        \_ Use Excel.
           1. Open foo.txt in Excel.  It should convert all numbers to cells in
	...
2010/1/22-30 [Computer/HW/Laptop, Computer/SW/OS/OsX] UID:53655 Activity:high
1/22    looking to buy a new development laptop
        needs ssdrive, >6 hr possible batt life, and runs linux reasonably
        Anyone have a recommendation? Thx.
        \_ thinkpad t23 w ssdrive and battery inplace of drive bay
        \_ Ever wondered what RICHARD STALLMAN uses for a laptop?  Well,
           wonder no more!
	...
2009/2/27-3/5 [Computer/Networking] UID:52658 Activity:nil
2/27    I need to buy a wireless router, can u guys help me out?   I need the
        following features:  wireless, G or better, PPTP dial up, PPoE dialup,
        VoIP/SIP register, DDNS, uPnP.
        I am having a such hard time to find a review site which allow me to
        select these features.   Any ideas?  There are a couple model from
        this small company Draytek has these features, I am having the hardest
	...
2008/9/22-29 [Computer/SW/Database] UID:51265 Activity:nil
9/22    In SQL, how can I do something like this:
        SELECT ip_addr, count(*) AS ct FROM table WHERE
          ct > 10 GROUP BY ip_addr?
        I can't get the conditionals to recognize 'ct'
        \_ SELECT ip_addr, count(*) AS ct FROM table HAVING
            count(*) > 10 GROUP BY ip_addr?
	...