Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #321

Re: Joining(?) question

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "mdR" <mdr@THRWHITE.remove-dii-this>
Subject Re: Joining(?) question
Message-ID <f147db6f-8bd6-4cfd-86f7-79fcccad6b4a@y29g2000hsf.googlegroups.com> (permalink)
X-Comment-To comp.lang.java.databases
Newsgroups comp.lang.java.databases
In-Reply-To <49087fa7$0$2921$fa0fcedb@news.zen.co.uk>
References <49087fa7$0$2921$fa0fcedb@news.zen.co.uk>
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 63
Date Wed, 27 Apr 2011 15:23:03 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303917783 96.60.20.240 (Wed, 27 Apr 2011 10:23:03 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:23:03 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.databases:321

Show key headers only | View raw


  To: comp.lang.java.databases
On Oct 29, 10:22 am, RedGrittyBrick <RedGrittyBr...@spamweary.invalid>
wrote:
> mdR wrote:
> > ~hey all
>
> > Looking for some assistance writing a SQL query (using Derby).  If
> > anyone could help I would appreciate it.
> > I am having trouble wrapping my head around the query syntax needed to
> > do the following...
>
> > Given the following tables:
>
> > Table BM
> > ------------------------
> > PARENT | ITEM
> > ------------------------
> > 1        2
> > 1        3
> > 4        9
> > 4        9
>
> > Table IM
> > --------------
> > ITEM   | DESC
> > --------------
> > 1        First
> > 2        Second
> > 3        Third
>
> > How to: Select all rows from BM where PARENT = 1 and supply IM.DESC to
> > ITEM column results.
>
> > to achieve this result...
> > -----------------------
> > PARENT  | ITEM | DESC
> > -----------------------
> > 1         2      Second
> > 1         3      Third
>
> > Is this possible?  Seems like I should be able to do this.
> > (Hope I explained this well enough!)
>
> SELECT BM.PARENT, BM.ITEM, IM.DESC
>    FROM BM, IM
>    WHERE IM.ITEM = BM.ITEM
>    AND BM.PARENT = 1
>
> This is an SQL question not a Java question - I would not have posted it
> here.
>
> --
> RGB

thanks, I'll give that a try
good point... wasn't thinking :)
-mark

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Joining(?) question "mdR" <mdr@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
  Re: Joining(?) question "RedGrittyBrick" <redgrittybrick@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
    Re: Joining(?) question "mdR" <mdr@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
    Re: Joining(?) question "mdR" <mdr@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000
      Re: Joining(?) question "=?ISO-8859-1?Q?Arne_Vajh=" <=?iso-8859-1?q?arne_vajh=@THRWHITE.remove-dii-this> - 2011-04-27 15:23 +0000

csiph-web