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 Problem

Re: SQL Problem

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Fri, 15 Oct 2004 18:51:16 -0700
Message-ID: <1097891564.514408@yasure>


Denis Carraro wrote:

> Hi
>
> i have problem with this SELECT...
>
> can u help me????
>
> SELECT
> concat(concat(CAPUSERCUSTOM.SCHAR2,' '),CAPUSERCUSTOM.LCHAR1) AS
> Societa,
> concat(concat(CAPUSER.LASTNAME,' '),CAPUSER.FIRSTNAME) AS
> Dipendente,
> CAPUSER.LOGINNAME,
> CAPUSERENTITYXREF.CAPUSERAPNUMBER,
> concat(concat(to_char(STDACCTNGEXPORT.TRANSACTIONDATE,'DD.MM.YYYY'),
> ' - '),STDACCTNGEXPORT.CATEGORYTYPENAME),
> CASE WHEN STDACCTNGEXPORT.CATEGORYTYPENAME = 'Vitto e Alloggio
> Italia' THEN SUM(STDACCTNGEXPORT.SIGNEDAMOUNT) - 100 ELSE
> SUM(STDACCTNGEXPORT.SIGNEDAMOUNT) - 200 END
> FROM
> CAPUSER,
> CAPUSERENTITYXREF,
> CAPUSERCUSTOM,
> STDACCTNGEXPORT
> WHERE
> ( CAPUSER.CAPUSERID=CAPUSERENTITYXREF.CAPUSERID )
> AND ( CAPUSERENTITYXREF.CAPUSERID=CAPUSERCUSTOM.CAPUSERID )
> AND ( STDACCTNGEXPORT.CAPUSERID=CAPUSER.CAPUSERID )
> AND (
> ( CAPUSER.FIRSTNAME <> 'Test' )
> AND nvl(STDACCTNGEXPORT.CATEGORYTYPENAME,'Altre spese') IN
> ('Vitto e Alloggio Italia', 'Vitto e Alloggio Estero')
> AND ( to_char(STDACCTNGEXPORT.EXPORTDATE,'MM') = case when
> to_char(sysdate,'MM') = 1 then 12 else to_char(sysdate,'MM') - 1 end
> )
> AND ( to_char(STDACCTNGEXPORT.EXPORTDATE,'YYYY') = case when
> to_char(sysdate,'MM') = 1 then to_number(to_char(sysdate,'YYYY')) - 1
> else to_number(to_char(sysdate,'YYYY')) end )
> )
> GROUP BY
> concat(concat(CAPUSERCUSTOM.SCHAR2,' '),CAPUSERCUSTOM.LCHAR1),
> concat(concat(CAPUSER.LASTNAME,' '),CAPUSER.FIRSTNAME),
> CAPUSER.LOGINNAME,
> CAPUSERENTITYXREF.CAPUSERAPNUMBER,
> concat(concat(to_char(STDACCTNGEXPORT.TRANSACTIONDATE,'DD.MM.YYYY'),
> ' - '),STDACCTNGEXPORT.CATEGORYTYPENAME)
And the problem is?

While you're at it how about a volume and an explanation of what it is you think this is doing in what product?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Fri Oct 15 2004 - 20:51:16 CDT

Original text of this message

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