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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Sql query

RE: Sql query

From: Sony kristanto <Sony_at_polyfincanggih.com>
Date: Wed, 05 Feb 2003 17:33:55 -0800
Message-ID: <F001.005453B8.20030205173355@fatcity.com>

        Hi Roland,

        I make a little modification to your query below,

        SELECT distinct PBK.VARUKORGEANREL_ULAG.ean, 0, 0, 0, rik2.vare.varenavn, rik2.vare.str,

                      PBK.VARUKORGEANREL_ULAG.lagstapris, rik2.vare.hylletxt2, rik2.art_hierarki.vgrp, rik2.hierarki_tekst.tekst,

                      '0', '0', 0, pbk.underlag.period, 'rsm',pbk.sortiment_vgrp.sortiment,rik2.art_hierarki.art_grp,rik2.art_hierar ki.art_ugrp

        FROM PBK.UNDERLAG, PBK.VARUKORGEANREL_ULAG, rik2.vare, rik2.hierarki_tekst, rik2.art_hierarki,

	              pbk.sortiment_vgrp
	WHERE PBK.underlag.underlagid=1100
	AND       PBK.underlag.varukorgid=PBK.varukorgeanrel_ulag.varukorgid
	AND        PBK.VARUKORGEANREL_ulag.varutyp=0

	I think you miss to join another four tables,
	AND       RIK2.VARE = RIK2.HIERARKI_TEKST
	AND       RIK2.HIERARKI_TEKST = RIK2.ART_HIERARKI
	AND       RIK2.ART_HIERARKI = PBK..SOTIMENT_VGRP;

	Hope this is what you mean.

	Rgrds,

	Sony



> -----Original Message-----
> From: roland.skoldblom_at_ica.se [SMTP:roland.skoldblom_at_ica.se]
> Sent: Wednesday, February 05, 2003 9:53 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Sql query
>
>
> I have this sql query. I am wondering why this query takes so long time,
> Do I need more conditions to make it run, or it it just that this query
> take so long time to run? Anything wrong with the query?
>
> Please help me with this.
>
> SELECT distinct PBK.VARUKORGEANREL_ULAG.ean, 0, 0, 0, rik2.vare.varenavn,
> rik2.vare.str, PBK.VARUKORGEANREL_ULAG.lagstapris, rik2.vare.hylletxt2,
> rik2.art_hierarki.vgrp, rik2.hierarki_tekst.tekst, '0', '0', 0,
> pbk.underlag.period,
> 'rsm',pbk.sortiment_vgrp.sortiment,rik2.art_hierarki.art_grp,rik2.art_hier
> arki.art_ugrp
> FROM PBK.UNDERLAG, PBK.VARUKORGEANREL_ULAG, rik2.vare,
> rik2.hierarki_tekst, rik2.art_hierarki, pbk.sortiment_vgrp
> WHERE PBK.underlag.underlagid=1100
> AND PBK.underlag.varukorgid=PBK.varukorgeanrel_ulag.varukorgid
> AND PBK.VARUKORGEANREL_ulag.varutyp=0;
>
>
> Thanks in advance
>
>
> Roland
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author:
> INET: roland.skoldblom_at_ica.se
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Sony kristanto
  INET: Sony_at_polyfincanggih.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Feb 05 2003 - 19:33:55 CST

Original text of this message

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