Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sql query

Re: sql query

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 27 Jul 2004 14:34:49 -0700
Message-ID: <4b5394b2.0407271334.483660ff@posting.google.com>


"Mariusz Stefaniak" <mariusz_at_stefaniak.cjb.net> wrote in message news:<ce5a8s$lva$1_at_achot.icm.edu.pl>...
> I'm beginer, plase help me
>
> I have on my oracle 9 server, table like this:
>
> G | K | Wartosc
> ---------------------------------
> A | 1 | 0
> A | 2 | 1
> A | 3 | 1
> A | 4 | 0
> B | 1 | 1
> B | 2 | 0
> B | 3 | 0
> B | 4 | 0
> B | 5 | 1
>
> I'd like to get data presentation like this:
> G | K | Wartosc | G | K | Wartosc |
> ----------------------------------------------------------
> A | 1 | 0 | B | 1 | 1 |
> A | 2 | 1 | B | 2 | 0 |
> A | 3 | 1 | B | 3 | 0 |
> A | 4 | 0 | B | 4 | 0 |
> | B | 5 | 1
> |
>
>
> Plase, help me make sql query
>
>
> Thank you very much
> Mariusz

What class are you taking? Have you TRIED writing anything? (even the query that gave the "table like this" result would show you started.)

But here's the hint: In a relational DB, everything is a table. Tables can be joined to each other. Tables can even be joined to themselves.

Let us know how you do.
  Ed Received on Tue Jul 27 2004 - 16:34:49 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US