Query with MARA MVKE and MAST

Hi
  Im trying to create a query with MARA, MVKE and MAST tables. If corresponding records exist in all the 3 tables, I get output. Otherwise, I get the result as 'No data selected'. I tried using left outer join with MAST , tried using MARC also between MARA and MAST but its of no use. Please suggest how I can both get the sales data and BOM details in the output.
Thanks
Aparna

Hi Aparna,
Goto  SE16 Check in table,
1.KDST -
Sales order to BOM link
2.STKO -
BOM - header
3.STPO -
BOM - item
And also you create a query and check the out put.

Similar Messages

  • How do I create a folder or report from a query with a union and parameters

    I have created folders with unions but I am having difficulty coverting a query with a union and parameters.
    The following works great in SQL*Developer without parameters, but I want to change to use parameters for the year and quarter and use it in Discoverer:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
      AV.FIRM_NAME VENDOR_NAME,
      AV.BIDCLASS CONTRACT_CODES,
      AV.AWAMT AWARD_AMOUNT,
      AV.SOL_MODE FORMAL_INFORMAL,
      AV.CERT BUSINESS_ENTITY,
      AV.ETHNICITY ETHNICTY,
      AV.PO_NUMBER_FORMAT CONTRACT,
      SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
      CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID       = VP.VENDOR_ID ) )
    AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')
    AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
      AV.FIRM_NAME,
      AV.BIDCLASS,
      AV.AWAMT,
      AV.SOL_MODE,
      AV.CERT,
      AV.ETHNICITY,
      AV.PO_NUMBER_FORMAT
      union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
      AV2.FIRM_NAME VENDOR_NAME,
      AV2.BIDCLASS CONTRACT_CODES,
      AV2.AWAMT AWARD_AMOUNT,
      AV2.SOL_MODE FORMAL_INFORMAL,
      AV2.CERT BUSINESS_ENTITY,
      AV2.ETHNICITY ETHNICTY,
      AV2.PO_NUMBER_FORMAT CONTRACT,
      0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
                  FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
                 WHERE av2.po_number = vp2.po_number
                       AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = '4')
                       AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = '2009' ))
    AND (TO_CHAR(AV2.AWDATE,'Q') = '4')
    AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
      AV2.FIRM_NAME,
      AV2.BIDCLASS,
      AV2.AWAMT,
      AV2.SOL_MODE,
      AV2.CERT,
      AV2.ETHNICITY,
      AV2.PO_NUMBER_FORMAT Can someone provide a solution?
    Thank you,
    Robert

    Hi,
    You can take the parameters to the select so that you will be able to create conditions over them.
    Try to use this SQL instead of your and in the discoverer workbook create the conditions and parameters:
    SELECT TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000') FEID,
    AV.FIRM_NAME VENDOR_NAME,
    AV.BIDCLASS CONTRACT_CODES,
    AV.AWAMT AWARD_AMOUNT,
    AV.SOL_MODE FORMAL_INFORMAL,
    AV.CERT BUSINESS_ENTITY,
    AV.ETHNICITY ETHNICTY,
    AV.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    SUM(VP.INVOICE_AMOUNT) AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV,
    CONFIRM.VSTATE_VENDOR_PAYMENTS VP
    WHERE ( ( AV.PO_NUMBER = VP.PO_NUMBER
    AND AV.VENDOR_ID = VP.VENDOR_ID ) )
    --AND (TO_CHAR(VP.PAYMENT_DATE,'Q') = '4')*
    --AND ( TO_CHAR(VP.PAYMENT_DATE,'YYYY') = '2009' )*
    GROUP BY TO_CHAR(NVL(AV.TAX_ID,999999999),'000000000'),
    AV.FIRM_NAME,
    AV.BIDCLASS,
    AV.AWAMT,
    AV.SOL_MODE,
    AV.CERT,
    AV.ETHNICITY,
    AV.PO_NUMBER_FORMAT ,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    union
    SELECT TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000') FEID,
    AV2.FIRM_NAME VENDOR_NAME,
    AV2.BIDCLASS CONTRACT_CODES,
    AV2.AWAMT AWARD_AMOUNT,
    AV2.SOL_MODE FORMAL_INFORMAL,
    AV2.CERT BUSINESS_ENTITY,
    AV2.ETHNICITY ETHNICTY,
    AV2.PO_NUMBER_FORMAT CONTRACT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    0 AMOUNT_PAID_$
    FROM CONFIRM.VSTATE_PAID_AWARD_VENDORS AV2
    WHERE
    not exists (SELECT 'X'
    FROM CONFIRM.VSTATE_VENDOR_PAYMENTS VP2
    WHERE av2.po_number = vp2.po_number
    AND (TO_CHAR(VP2.PAYMENT_DATE,'Q') = TO_CHAR(VP.PAYMENT_DATE,'Q') )
    AND ( TO_CHAR(VP2.PAYMENT_DATE,'YYYY') = TO_CHAR(VP.PAYMENT_DATE,'YYYY') ))
    --AND (TO_CHAR(AV2.AWDATE,'Q') = '4')*
    --AND (to_CHAR(AV2.AWDATE,'YYYY') = '2009')*
    GROUP BY TO_CHAR(NVL(AV2.TAX_ID,999999999),'000000000'),
    AV2.FIRM_NAME,
    AV2.BIDCLASS,
    AV2.AWAMT,
    AV2.SOL_MODE,
    AV2.CERT,
    AV2.ETHNICITY,
    AV2.PO_NUMBER_FORMAT,
    TO_CHAR(VP.PAYMENT_DATE,'YYYY') P_YEAR,
    TO_CHAR(VP.PAYMENT_DATE,'Q') P_QTR
    Tamir

  • Absolute dynamic select query with dynamic join and where

    Has anyone ever tried creating an absolutely dynamic SELECT query with dynamic Join and Where conditions.
    I have a requirement of creating such a query in an Utility Class, and i have written the code. But its throwing my sysntax errors.
    Please let me know where am I going wrong OR is it really possible to create such a dynamic Query??
        SELECT (FIELDS) INTO TABLE IT_TABLES
          FROM ( (ME->TABLE1)  inner join ( me->table2 )
          on ( on_condition ) )
          WHERE (me->where_fields).
    Ags.

    It worked for me in a following way:
    select * into corresponding fields of table <result_table>
            from (join_string)
            where (l_where).
    Where the contents of join_string were dynamically build using concatenation. So it will be something like
    concatenate ME->TABLE1 'as a INNER JOIN' me->table2 'as b ON (' into join_string separated by space.
    <...>
    add here matching/reference colums, something like
    concatenate 'a~' me->TABLE1_JOIN_COL into temp1.
    concatenate 'b~' me->TABLE2_JOIN_COL into temp2.
    concatenate join_string temp1 '=' temp2 into join_string separated by space.
    <...>
    concatenate join_string ')' into join_string separated by space.
    And then use similar approach for l_where variable.

  • Af:query with bind variables and Saved Search

    I have a VO and view criteria(VC).
    VC has a criteria item ObsoleteDate with range specified as bindVariables "dateFrm" and "dateTo" I dragged & dropped the named criteria as af:Query with table. Table toolbar has 2 buttons in which I set & clear the bind variables. Data is fetched as per as expected based on the VC & bind variables.
    The problem is,
    If I save my search with bind variables set and swap between the saved searches , all works fine. But the moment I clear bind variables & swap between searches.. "dateFrm" is populated and "dateTo" is null and I get an Exception oracle.jbo.AttrValException: JBO-27035: Attribute Obsolete Date: is required.
    Why is this happening?? Saved search is supposed to save the VC with all the bind values set while saving and clearing bind variables shouldn't affect the saved search, right?? Or I have understood it wrong?
    I am using JDeveloper 11.1.2.3.0
    Thanks

    Try
    like ? || '%'

  • Rewrite the query with out joins and group by

    Hi,
    This was an interview question.
    Table Names: bookshelf_checkout
    bookshelf
    And the join condition between these two tables is title
    We need to rewrite below query without using join condition and group by clause ?
    SELECT b.title,max(bc.returned_date - bc.checkout_date) "Most Days Out"
               FROM bookshelf_checkout bc,bookshelf b
               WHERE bc.title(+)=b.title
               GROUP BY b.title;When I was in college, I read that most of the SELECT statements can be replaced by basic SQL operations (SET OPERATORS). Now I am trying to rewrite the query with SET operators but not able to get the exact result.
    Kindly help me on this.
    Thanks,
    Suri

    Something like this?
      1  WITH books AS (
      2  SELECT 'title 1' title FROM dual UNION ALL
      3  SELECT 'title 2' FROM dual UNION ALL
      4  SELECT 'title 3' FROM dual ),
      5  bookshelf AS (
      6  SELECT 'title 1' title, DATE '2012-05-01' checkout_date, DATE '2012-05-15' returned_date FROM dual UNION ALL
      7  SELECT 'title 1' title, DATE '2012-05-16' checkout_date, DATE '2012-05-20' returned_date FROM dual UNION ALL
      8  SELECT 'title 2' title, DATE '2012-04-01' checkout_date, DATE '2012-05-15' returned_date FROM dual )
      9  SELECT bs.title, MAX(bs.returned_date - bs.checkout_date) OVER (PARTITION BY title) FROM bookshelf bs
    10  UNION
    11  (SELECT b.title, NULL FROM books b
    12  MINUS
    13* SELECT bs.title, NULL FROM bookshelf bs)
    SQL> /
    TITLE   MAX(BS.RETURNED_DATE-BS.CHECKOUT_DATE)OVER(PARTITIONBYTITLE)
    title 1                                                           14
    title 2                                                           44
    title 3Lukasz

  • Facing Issue with MARS Logs and reports

    Hi
    We have intergrated PIX Firewall and Router with MARS(4.3.3) . we are able to get the AAA Pass/FailAttempts & Configuration Changes for PIX Firewall but not for Router .
    We check on the Agent Machine where we have install Windows Remote Agent of ACS . There we are able to see the logins Pass/FailAttempts made in Routers but its big question that why its not getting . reflected in MARS .Even for configurtion Change report we have given the IP-address of MARS to one of our Syslog Machince and found that the Syslogs from Routers are getting reflected there but if change back to MARS then we are not able to get it reflected
    CAN anyone help me out in this issue as you can see above we have tried all possible troubleshooting

    Hi
    We have intergrated PIX Firewall and Router with MARS(4.3.3) . we are able to get the AAA Pass/FailAttempts & Configuration Changes for PIX Firewall but not for Router .
    We check on the Agent Machine where we have install Windows Remote Agent of ACS . There we are able to see the logins Pass/FailAttempts made in Routers but its big question that why its not getting . reflected in MARS .Even for configurtion Change report we have given the IP-address of MARS to one of our Syslog Machince and found that the Syslogs from Routers are getting reflected there but if change back to MARS then we are not able to get it reflected
    CAN anyone help me out in this issue as you can see above we have tried all possible troubleshooting

  • Query with drill down and w/o drill down

    Hi experts,
    We created a query with a RKF. In the output we are getting the RKF value correctly. But when we dril
    downed a characteristic i.e Special GL Ind the output is not matching. It is showing incorrect value when
    compared with the value without drill down. But if we remove the drill down then it is showing the correct
    value. What is the reason for this ?
    Regards,
    smitha.

    Our RKF def is as follows:
    Keyfigure: 0deb_cre_lc
    Chars:
    Posting Keys: 01,02,11,12
    Year start date: Restricting it with a variable created on it. Variable is of type Customer exit.This variable
    gets value from key date which is entered by user dynamically.
    Specified the offsets of Yr start date as 0 to 365.
    Regards,
    smitha.

  • How to write a query with group by and order by for a date column

    I have a query:
    select count(*), to_char(s.pdate,'Mon-yyyy') as month from sTable s
    group by to_char(s.pdate,'Mon-yyyy')
    order by to_date(s.pdate,'Mon-yyyy')
    However, I got an error: not a GROUP By expression.
    If i just run: select count(*), to_char(s.pdate,'Mon-yyyy') as month from sTable s
    group by to_char(s.pdate,'Mon-yyyy')
    it is work fine.
    How to solve the problem.
    Thanks,
    Jen

    Jen,
    You can use this code
    with sTable as (select to_date('01/01/2009', 'dd/mm/yyyy') pdate,  1 code from dual union all
                  select to_date('02/02/2009', 'dd/mm/yyyy') a, 2 code from dual union all
                  select to_date('01/03/2009', 'dd/mm/yyyy') d, 3 code from dual union all
                  select to_date('05/04/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/05/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/06/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/07/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/08/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/09/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/10/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/11/2009', 'dd/mm/yyyy') g, 4 code from dual union all
                  select to_date('05/12/2009', 'dd/mm/yyyy') h, 5 code from dual)
    select cnt, to_char(to_date(mnt||'01', 'yyyymmdd'), 'Mon-yyyy')
      from (select count(*) cnt, to_char(s.pdate,'yyyymm') as mnt
              from sTable s
             group by to_char(s.pdate,'yyyymm')
             order by to_char(s.pdate,'yyyymm')
           CNT MONTH
             1 Jan-2009
             1 Feb-2009
             1 Mar-2009
             1 Apr-2009
             1 May-2009
             1 Jun-2009
             1 Jul-2009
             1 Aug-2009
             1 Sep-2009
             1 Oct-2009
             1 Nov-2009
             1 Dec-2009
    12 rows selectedyour problem was that you are using a expresión in the order by (to_date...) that is distinct to the query results (to_char...).
    Regards,
    Mike

  • Duplicate rows on Query with journal entries and AP documents

    Hi Experts,
    I ahve the below query allowing me to have some information from journal entries and retrieve some other from AP docuements and PO.
    The thing is the query duplicates rows because the AP docuements have several rows but i don t know how to do to remove them (i guess this has to do with JOIN function...)
    SELECT
    T2.[GroupMask] as 'Account Family',
    T2.[FatherNum] as 'Parent Account',
    T2.[AcctCode] AS 'Account Code',
    T2.[AcctName] AS 'Account Name',
    T0.[TaxDate] AS 'Document Date',
    T0.[Number] AS 'Number',
    T0.[DocSeries] AS 'Document Series',
    T0.[BaseRef] AS 'Base Reference',
    T0.[TransId] AS 'Transaction Number',
    T0.[Ref2] AS 'Reference 2',
    T1.[ContraAct] AS 'Offset Account',
    T4.[BaseRef] AS 'PO code',
    T1.[Project] AS 'Project Code',
    T1.[ProfitCode] AS 'Distribution Rule',
    T1.[OcrCode2] AS 'Costing Code 2',
    T1.[OcrCode3] AS 'Costing Code 3',
    T1.[OcrCode4] AS 'Costing Code 4',
    (T1.[SYSdeb]-T1.[SYSCred])  AS 'Total Amount EUR',
    (T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
    T5.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM  [dbo].[OJDT] T0 
    INNER  JOIN [dbo].[JDT1] T1  ON  T1.[TransId] = T0.[TransId]  
    INNER  JOIN [dbo].[OACT] T2  ON  T2.[AcctCode] = T1.[Account]  AND T2.[AcctCode] = T1.[Account]  
    INNER JOIN [dbo].[OPCH] T3 ON T3.[DocNum] = T0.[BaseRef]
    INNER JOIN [dbo].[PCH1] T4 ON T3.[DocEntry] = T4.[DocEntry]
    LEFT JOIN [dbo].[OPOR] T5 ON T5.[DocNum] = T4.[BaseRef]
    WHERE
    (T2.[AcctCode] > (N'599999' ) ) AND  (T2.[AcctCode] < (N'799999' ) )
    AND (T0.[TaxDate]>= [%0] ) AND (T0.[TaxDate]<= [%1])

    Try This
    SELECT T2.[GroupMask] AS 'Account Family',
       T2.[FatherNum] AS 'Parent Account',
       T2.[AcctCode] AS 'Account Code',
       T2.[AcctName] AS 'Account Name',
       T0.[TaxDate] AS 'Document Date',
       T0.[Number] AS 'Number',
       T0.[DocSeries] AS 'Document Series',
       T0.[BaseRef] AS 'Base Reference',
       T0.[TransId] AS 'Transaction Number',
       T0.[Ref2] AS 'Reference 2',
       T1.[ContraAct] AS 'Offset Account',
       T4.[BaseRef] AS 'PO code',
       T1.[Project] AS 'Project Code',
       T1.[ProfitCode] AS 'Distribution Rule',
       T1.[OcrCode2] AS 'Costing Code 2',
       T1.[OcrCode3] AS 'Costing Code 3',
       T1.[OcrCode4] AS 'Costing Code 4',
       sum(T1.[SYSdeb]-T1.[SYSCred]) AS 'Total Amount EUR',
       sum(T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
       T6.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM OJDT T0
    INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
    INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
    INNER JOIN OPCH T3 ON T0.TransId = T3.TransId
    INNER JOIN PCH1 T4 ON T3.DocEntry = T4.DocEntry
    INNER JOIN POR1 T5 ON T4.[BaseEntry] = T5.[DocEntry]
    AND T4.[BaseLine] = T5.[LineNum]
    INNER JOIN OPOR T6 ON T5.DocEntry = T6.DocEntry
    GROUP BY T2.[GroupMask],
       T2.[FatherNum],
       T2.[AcctCode],
       T2.[AcctName],
       T0.[TaxDate],
       T0.[Number],
       T0.[DocSeries],
       T0.[BaseRef],
       T0.[TransId],
       T0.[Ref2],
       T1.[ContraAct],
       T4.[BaseRef],
       T1.[Project],
       T1.[ProfitCode],
       T1.[OcrCode2],
       T1.[OcrCode3],
       T1.[OcrCode4],
       T6.[DocTotalSy]
    Regards,
    Kennedy

  • Error in query with COUNT expression and Group By Clause

    Hi
    I have this query that when run gives me the following error:
    SQL command not properly ended:
    The code is as below:
    SELECT
              st_enrollment.student_id ,
              ce_family_member.last_name ,
              st_enrollment.grade_level ,
              ce_family_member.DATE_OF_BIRTH ,
              ce_family_member.GENDER,
              at_hourly_attendance_records.ABSENCE_REASON_CODE,
              at_hourly_attendance_records.CALENDAR_DATE,
              COUNT(st_enrollment.student_id) AS days_absent
              FROM
                      at_hourly_attendance_records,
                      ce_family_member,
                      st_enrollment
              WHERE
              st_enrollment.student_id = at_hourly_attendance_records.student_id
             AND ce_family_member.student_id = st_enrollment.student_id
                AND st_enrollment.school_id = 705
                AND st_enrollment.school_year = 2006
                AND st_enrollment.district_number = 1000
                AND at_hourly_attendance_records.ATTENDANCE_STATUS = 'A'
                AND at_hourly_attendance_records.CALENDAR_DATE < '16-MAR-06'
              GROUP BY st_enrollment.student_id,
                       ce_family_member.last_name
                         st_enrollment.grade_level ,
                         ce_family_member.DATE_OF_BIRTH ,
                         ce_family_member.GENDER,
                         at_hourly_attendance_records.ABSENCE_REASON_CODE,
                         at_hourly_attendance_records.CALENDAR_DATE;
           All suggestions are gratefully acknowledgment, Thanks in advance

    Thanks a lot. In fact I discovered it myself and I am immensely grateful to you for pointing the error..

  • Query with Start Date and End Date

    Dear Members,
    I have done a basic query on to get a report on Sales Invoices processed in a given period with the General Ledger account they were posted to. Minor hassle is that to change the dates, I have to go into the script (see extract below) and change dates manually, save query etc.
    Is there a way to have the query, when selected to run, pop up with window, allowing user to input say "start date" and "finish date". I imagine it will require some complex addition to the script below, any assistance will be appreciated.
    Regards
    Raj
    SELECT T1.[DocNum] AS 'Document Number', T1.[DocDate] AS 'Posting Date', T0.[AcctCode] AS 'Account Code', T0.[Dscription] AS 'Item/Service Description', T0.[LineTotal] AS 'Row Total' FROM  [dbo].[INV1] T0  INNER  JOIN [dbo].[OINV] T1  ON  T1.[DocEntry] = T0.[DocEntry]   WHERE T1.[DocDate] > (CONVERT(DATETIME, '20110801', 112) )  AND  T1.[DocDate] < (CONVERT(DATETIME, '20110831', 112) )

    Hi Raj,
    try this:
    /*SELECT FROM [dbo].[OINV] T0*/
    declare  @StartDate as datetime
    /* WHERE */
    set @StartDate = /* T0.DocDate */ '[%0]'
    /*SELECT FROM [dbo].[OINV] T1*/
    declare  @EndDate as datetime
    /* WHERE */
    set @EndDate = /* T0.DocDate */ '[%1]'
    SELECT T1.DocNum AS 'Document Number', T1.DocDate AS 'Posting Date', T0.AcctCode AS 'Account Code', T0.Dscription AS 'Item/Service Description', T0.LineTotal AS 'Row Total'
    FROM dbo.INV1 T0 INNER JOIN dbo.OINV T1 ON T1.DocEntry = T0.DocEntry WHERE T1.DocDate > @StartDate AND T1.DocDate < @EndDate
    Thanks,
    Neetu

  • Setrow with Paged Dataset and Master / Detail containers

    Hi,
    I am building a photo album.
    I am using paged views on the photos as the collection is currently 132 and growing.  So I have a paged view of 15 photos at a time, which are in a master container.  I want to be able to click a photo thmubnail and for it to update the large photo in the detail region.  However with paged views it doesn't seem to update the current row in the detail region.  If I used the Spry dataset the pagedview is built on the setrow functionality works fine.
    The page is here www.thehmc.co.uk/photo4.html
    What are my options to get this working?
    Cheers
    Phil

    Hi Phil,
    This is completely out of context and I am probbaly risking a flame, Still I want to share the following piece of code with you.
    <p> &copy; 2008
    <script language="JavaScript" type="text/javascript">
                var d=new Date();
                yr=d.getFullYear();
                if (yr!=2008)
                  document.write("- "+yr);
              </script>
    Created / Maintained by Phil Whitehurst</p>
    This will automatically update the year.
    Ben

  • Create  query with top 5 and rest

    Hi,i want to have a query that gives a list in the following format
    customer  - value of orders
    #1            -  20.500
    #2            -  20.100
    #3            -  16.000
    #4            -  15.000
    #5            -  14.000
    Rest         -  49.600
    how can i achieve that in a convenient way  - filters,conditions,exceptions,properties etc - all those new stuff?
    (i am new to BI,so excuse my beginners question,please)

    Hi,i am not sure if it is possible to diaply Value of Rest with standard functionality.Instead you can display Overall result.
    Create a condition TOP N and speify the number as 5. and make sure Suppress Result rows of Customer is set to 'never'.So you will get displayed Top 5 Customers and Overall result.
    if you are saving the result as WorkBook,then add one more Row after Query result to display result  with the Excel formula Overall Result-Top 5.Save the Workbook.

  • Compare the result of a query with a number and return a message

    Hello,
    I have the following query in oracle 9i:
    SELECT COUNT(*)
    FROM hourly_files
    WHERE date_received = TO_DATE((SELECT TO_CHAR(SYSDATE - INTERVAL '1' DAY,'DDMMYYYY')
    FROM DUAL), 'DDMMYYYY');
    This will produce a count of the required rows
    I need to compare the output number with another hardcoded number (threshold) and print an appropriate message e.g.
    if the output of the above query is 18000 and the threshold number is set to 20000, then output a meesage:
    Number of files received less than 2000
    Any help will be much appreciated !
    Thank you.

    SQL> ed
    Wrote file afiedt.buf
      1  SELECT CASE WHEN COUNT(*) >5 THEN 'Number is > than 5'
      2              WHEN COUNT(*) <1 THEN 'Its less than 1'
      3  ELSE 'Its in between'
      4  END
      5  FROM emp
      6* WHERE deptno=20
    SQL> /
    CASEWHENCOUNT(*)>5
    Its in between
    SQL> SELECT COUNT(*) FROM emp
      2  WHERE deptno=10;
      COUNT(*)
             3

  • Query With Bind Variables and %

    Hi,
    Quick question. I am using ADF BC on Jdev 11 with a MySQL Database.
    I've used Bind Variables in the past (I have to use a Question Mark [?]) and have had no problem.
    Now I want to do something like this in my where clause:
    SELECT TempTable.ABC FROM TempTable
    WHERE ABC LIKE ?%
    When I try and create the View Object with that query it is complaining about the %.
    Am I required to append the % in my bind variable? Any examples I have seen of this, people are doing something like :p_id = 'Jo%'

    Try
    like ? || '%'

Maybe you are looking for

  • FCP error message: Unable to read the data on your source tape!

    Hey, So I have been editing on the MacPro now for over a year and I have never seen this message before...the message reads: _*"Capture encountered a problem reading the data on your source tape. This could be due to a problem with the tape."*_ Has a

  • How to find my specific user exit

    hi friends, in the transaction vl06O , we have different screens under different tabs, in the screen under shipment tab, there are two fields, incoterm productcode i should change the values appearing in these fileds only for specific data, the data

  • List all files in a directory on a server that hosts the applet

    Hei :) I have a problem. I want to list all files in a directory on my server. ( http://www.foo.bar/tw ) The applet is in the root folder ( http://www.foo.bar ). So i tried it like this File fi = new URL(getCodeBase() + "/all/").getFile();But when I

  • Help...overwrite...(sorry i am a newbie)

    hi, i am a noob in java, and i have a question about overwriting in textfield, i am using netbeans 6.0, and i would like everytime i press tab to change the focus of the cursor on textfield, it highlights all the characters in chosen textfield... is

  • Dynamic update of the classpath

    Hi everybody ! I'm working on an application that uses plugins and that is able to compile them from inside it. I need to update the classpath so that thae update is applied without restarting the application. For the moment I'm working like this: I