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: From Access to Oracle

Re: From Access to Oracle

From: Regina Harter <rharter_at_emc-inc.com>
Date: Wed, 12 Sep 2001 11:21:12 -0700
Message-ID: <F001.0038BEE4.20010912101526@fatcity.com>

I haven't seen an answer to your question yet, so I will give it a shot. I am not extremely familiar with Access, but I believe inner join is just a regular join, so:

SELECT RIK2.LEV.LEVNR, RIK2.VARE.EAN_NR, RIK2.VARE.VARENAVN, RIK2.AVD.KJEDE, Sum(BRT.BRTOMS_DAG.ANT) AS ANT, Sum(BRT.BRTOMS_DAG.UTVERDI) AS UTVERDI, BRT.BRTOMS_DAG.DATO, Left([RIK2.VARE].[HYLLETXT2],12) AS VARUMARKE, RIK2_VARE.STR
FROM RIK2.LEV, RIK2.VARE, BRT.BRTOMS_DAG, RIK2.AVD

WHERE RIK2.LEV.LEVNR = RIK2.VARE.LEVNR
AND (RIK2.VARE.VARE_SNR = BRT.BRTOMS_DAG.VARE_SNR)
AND (RIK2.VARE.VARENR = BRT.BRTOMS_DAG.VARENR)
AND (RIK2_VARE.SORTIMENT = BRT_BRTOMS_DAG.SORTIMENT))
AND BRT.BRTOMS_DAG.AVDNR = RIK2.AVD.AVDNR AND (((RIK2.LEV.SELSKAP)="11") AND ((RIK2.VARE.SELSKAP)="11") AND ((RIK2.AVD.SELSKAP)="11"))
GROUP BY RIK2.LEV.LEVNR, RIK2.VARE.EAN_NR, RIK2.VARE.VARENAVN, RIK2.AVD.KJEDE, BRT.BRTOMS_DAG.DATO, RIK2.VARE.STR, RIK2.VARE.HYLLETXT2 HAVING (((RIK2.AVD.KJEDE) In (30,31,32,33,34))) ORDER BY RIK2.VARE.EAN_NR; At 11:45 PM 9/11/01 -0800, you wrote:

>Hallo,
>
>Anyone who can help me,
>
>I have this query in Ms Access:
>
>How should I write this sql statement in oracle.
>
>SELECT RIK2.LEV.LEVNR, RIK2.VARE.EAN_NR, RIK2.VARE.VARENAVN,
>RIK2.AVD.KJEDE, Sum(BRT.BRTOMS_DAG.ANT) AS ANT,
>Sum(BRT.BRTOMS_DAG.UTVERDI) AS UTVERDI, BRT.BRTOMS_DAG.DATO,
>Left([RIK2.VARE].[HYLLETXT2],12) AS VARUMARKE, RIK2_VARE.STR
>FROM ((RIK2.LEV INNER JOIN RIK2.VARE ON RIK2.LEV.LEVNR = RIK2.VARE.LEVNR)
>INNER JOIN BRT.BRTOMS_DAG ON (RIK2.VARE.VARE_SNR =
>BRT.BRTOMS_DAG.VARE_SNR) AND (RIK2.VARE.VARENR = BRT.BRTOMS_DAG.VARENR)
>AND (RIK2_VARE.SORTIMENT = BRT_BRTOMS_DAG.SORTIMENT))
>INNER JOIN RIK2_AVD ON BRT.BRTOMS_DAG.AVDNR = RIK2.AVD.AVDNR
>WHERE (((RIK2.LEV.SELSKAP)="11") AND ((RIK2.VARE.SELSKAP)="11") AND
>((RIK2.AVD.SELSKAP)="11"))
>GROUP BY RIK2.LEV.LEVNR, RIK2.VARE.EAN_NR, RIK2.VARE.VARENAVN,
>RIK2.AVD.KJEDE, BRT.BRTOMS_DAG.DATO, RIK2.VARE.STR, RIK2.VARE.HYLLETXT2
>HAVING (((RIK2.AVD.KJEDE) In (30,31,32,33,34)))
>ORDER BY RIK2.VARE.EAN_NR;
>
>I guess problem with left join, inner join and outer join
>
>
>
>
>Thanks in advance.
>
>
>Roland
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author:
> INET: Roland.Skoldblom_at_ica.se
>
>Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
>San Diego, California -- Public Internet access / Mailing Lists
>--------------------------------------------------------------------
>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.com
-- 
Author: Regina Harter
  INET: rharter_at_emc-inc.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
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 Sep 12 2001 - 13:21:12 CDT

Original text of this message

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