How to handle goup sub total for each group in oracle query ?

hi,
i want to handle one complex thing in oracle query.
i have a grouping in my oracle query.
i want to do sub total for each group in query and after that i want to subtract one group sub total from previous group subtotal ?
so how can i handle this in oracle query ?
any help is greatly appreciated.
thanks.

Hello
Interesting requirement.
I wonder why are you not using these calculation during the display time. If it is acceptable then you can try using the custom formula with the running total combination in crystral report to achieve to get the required results.
Best regards
Ali Hadi

Similar Messages

  • I have 3 guest lists names. How do I create a total for each list and a fourth total for all of them combined?

    I am getting married and I want to stay organized. I have a spread sheet for my guest list. It is 3 columns/lists (my family, his family, and friends). How do I make a running total of each list and a fourth total of all of them combined?
    Thanks so much!!!!

    If I understand your problem you want to keep a list for the bride, the groom and friends as well as a total of all guests.
    The total is the easiest.  If you have the other three numbers then you can use the function SUM() to add those three together.
    The rest of the problem is solved by assumeing:
    1) the lists are in columns
    2) the header does not count in the total
    taking the difference of the total rows and the blank rows minus 1 will give you the total guest names in the a column.
    The contents of cell:
    C2 =ROWS(Bride)-COUNTBLANK(Bride)-1
    C3=ROWS(Groom)-COUNTBLANK(Groom)-1
    C4=ROWS(Friends)-COUNTBLANK(Friends)-1
    C5=SUM(G2:G4)

  • Regarding ssis - how to handle new files in for each file enumerator

    Hi,
    I have one folder with 5 file text files by using for each file enumerator we store the files in to one folder but suddenly tomorrow one file add to that folder how to
    store the file into same destination?

    Inside foreach loop add a script task to check if file exists in destination folder. if exists set a boolean flag variable to True. Then link it to file system task you've using a conditional precedence constraint (Expression And Constraint). Set constraint
    as OnSuccess and expression as below
    @FlagVariable == False
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to create a dynamic menu for each group of responsibility and  user

    Hi
    I am using Jdev 11.1.1.6 and new to ADF, my application require to populate menu which would be different for different groups of user, and the user in each group would have different submenu depends on their responsibilities assigned to each one of them.
    so on the top level would be menu_top_item1, menue_top_item2
    |-->submenu1_1 |-->submenu2_1
    |-->submenu1_2 |-->submenu2_2
    also the menu would need to be on_mouse_over to show the submenu items or collapsed back.
    any idea what would be the best approch? or is there any example around?
    thanks a lot

    You can use ADF Security to control access to menu options.
    More about ADF Security here:
    http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/AdfSecurity/AdfSecurity.html
    If you also use WebCenter you might use their menuing option:
    https://blogs.oracle.com/shay/entry/webcenter_portal_intro_for_adf

  • How to select a max row for each group in SQL ( with distinct code )

    Dear friends, 
    My table is as show in below…  for each ‘grpid’ I want get row with Max tiv value and code should be distinct. Ie in result, code & grpid will come only once.
    grpid
    code
    Tiv
    2
    GB
    9
    2
    IN
    7
    1
    GB
    11
    1
    US
    10
    Result:    ( we are selecting   IN even though for grpid 2
     ‘GB’ has max value )
    grpid
    code
    Tiv
    2
    IN
    7
    1
    GB
    11
    -Sajid

    Thanks for reply..
    please see my  DML+  DL
    CREATE TABLE [dbo].[tab](
    [grpid] [int] NOT NULL,
    [code] [varchar](2) NOT NULL,
    [Tiv] [int] NOT NULL
    ) ON [PRIMARY]
    delete from tab
    insert into tab values (2 , 'GB' ,12)
    insert into tab values (2 , 'IN' ,10)
    insert into tab values (1 , 'GB' ,11)
    insert into tab values (1 , 'US' ,10)
    insert into tab values (3 , 'GB' ,10)
    insert into tab values (3 , 'US' ,9)
    insert into tab values (3 , 'UA' ,10)
    insert into tab values (3 , 'IN' ,8)
    Result:
    grpid      code     
    tiv
    1             
    US          10
    2             
    GB          12
    3             
    UA          10
    Thanks in Advance..
    -Sajid
    CREATE TABLE [dbo].[tab](
    [grpid] [int] NOT NULL,
    [code] [varchar](2) NOT NULL,
    [Tiv] [int] NOT NULL
    ) ON [PRIMARY]
    delete from tab
    insert into tab values (2 , 'GB' ,12)
    insert into tab values (2 , 'IN' ,10)
    insert into tab values (1 , 'GB' ,11)
    insert into tab values (1 , 'US' ,10)
    insert into tab values (3 , 'GB' ,10)
    insert into tab values (3 , 'US' ,9)
    insert into tab values (3 , 'UA' ,10)
    insert into tab values (3 , 'IN' ,8)
    ;with mycte as
    (select grpid,code,tiv , row_number() over(Partition by code Order by Tiv DESC) rn1, row_number() over(Partition by grpid Order by Tiv DESC) rn2
    from tab)
    ,mycte1 as (Select *
    , row_number() over(Partition by grpid, rn1 Order by rn2 ASC) rn3
    from mycte
    WHERE rn1=1
    Select grpid,code,tiv from mycte1
    Where rn3=1
    drop table tab

  • How to display different subtotal text for each group in alv report

    Hi,
    i need to display subtotal text as "totals of  Mat1"  for material numbers 1 to 10 as group1 and again i need to display subtotal text as " totals of Mat2" for material number 11 to 20.
    group 2.
    Please help me asap.

    You can create subtotals by columns.
    You would need extra column to group the materials( 1 to 10 GROUP1 20 to 30 GROUP2 by example)  and use this column for subtotals

  • How to select a max row for each group in SQL

    Dear Frindz,
    I want select countries with maximum value of 'Value' for a 'grpid'.  Also already selected 'Country' should not be considered for other 'grpid' while checking the maximum. ( ie Country or grpid should not be repeated in the result )
    CREATE TABLE [dbo].[test1](
    [Country] [varchar](4) NULL,
    [grpid] [int] NOT NULL,
    [Value] [float] NULL,
    [Row_number] [bigint] NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'US', 49707, 604456458, 1)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'US', 909, 604456458, 2)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'US', 231, 604456457, 3)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GB', 5086, 497654945, 4)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GB', 50147, 405759433, 5)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GB', 909, 405759433, 6)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GB', 231, 405759433, 7)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CA', 49707, 353500201, 8)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CA', 5086, 353500201, 9)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CA', 909, 353500201, 10)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CA', 231, 353500201, 11)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'JP', 49707, 198291290, 12)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'JP', 5086, 198291290, 13)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'JP', 909, 198291290, 14)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'JP', 231, 198291290, 15)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'MX', 49707, 181884714, 16)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'MX', 909, 181884714, 17)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'MX', 231, 181884714, 18)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'BR', 49707, 105147054, 19)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'BR', 5086, 105147054, 20)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'BR', 909, 105147054, 21)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'AR', 49707, 94774929, 22)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'AR', 5086, 94774929, 23)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'AR', 909, 94774929, 24)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'AR', 231, 94774929, 25)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'ZA', 49707, 84560514, 26)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'ZA', 909, 84560514, 27)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'ZA', 231, 84560514, 28)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CN', 49707, 68966682, 29)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CN', 909, 68966682, 30)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CN', 231, 68966682, 31)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CB', 49707, 65020665, 32)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CB', 5086, 65020665, 33)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CB', 909, 65020665, 34)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CB', 231, 65020665, 35)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GT', 49707, 42016510, 36)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GT', 5086, 42016510, 37)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'GT', 909, 42016510, 38)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CR', 49707, 37116544, 39)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CR', 5086, 37116544, 40)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CR', 909, 37116544, 41)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'CR', 231, 37116544, 42)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'SV', 49707, 31103322, 43)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'SV', 5086, 31103322, 44)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'SV', 909, 31103322, 45)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'NI', 49707, 17415843, 46)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'NI', 5086, 17415843, 47)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'NI', 909, 17415843, 48)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'HN', 49707, 12516273, 49)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'HN', 5086, 12516273, 50)
    GO
    INSERT [dbo].[test1] ([Country], [grpid], [Value], [Row_number]) VALUES (N'HN', 909, 12516273, 51)
    GO
    Result:
    Country
    grpid
    Value
    Row_number
    US
    49707
    604456458
    1
    GB
    5086
    497654945
    4
    CA
    909
    353500201
    10
    JP
    231
    198291290
    15
    -Sajid

    Hi Pituach, thanks for your reply.
    in result  Country or grpid should not be repeated... in your result 'GB' and 'US' is  repeating.
      1) select countries with maximum value of 'Value' for a 'grpid'
      2) 'grpid' & country should not be repeated.
      3)  we need to take next maximum 
    value if 'grpid'  not  there a for 
    highest value.
    Result:
    Country
    grpid
    Value
    Row_number
    US
    49707
    604456458
    1
    GB
    5086
    497654945
    4
    CA
    909
    353500201
    10
    JP
    231
    198291290
    15
    -Sajid
    -Sajid

  • How to create a sub total and grand total using my query.

    How can I create a sub total for each section and grand total for using my query like this.  your help is appreciated. I am working with 9g
    WITH  BidItemsInformation  AS
    ( SELECT DISTINCT q.iplineno "Line Number", q.section "Section Number",
             i.item "Item Number",
             initcap(i.idescr) "Description" ,
             i.iunits "Unit",
             q.qty "Quantity" ,q.price  "Engineers Unit Price",
           (q.price * q.qty) "Engineers Estimate"
         FROM letprop l,
            proposal p,
            propitem q,
            bidlet b,
            bidtabs c,
            itemlist i,
            vendor v,
            bidders d 
         WHERE(l.letting = b.letting
                And b.letting = c.letting
                And p.cspecyr = i.ispecyr)
                AND q.prpitem = i.item
                AND p.contid = l.lcontid
                AND q.contid = p.contid
                AND c.vendor = l.avendor
                AND l.CALL = c.CALL
                AND q.lineflag = c.lineflag
                AND q.iplineno = c.iplineno
                AND l.letting = d.letting 
                AND c.letting = l.letting
                AND c.CALL = d.CALL
                AND v.vendor = d.vendor
                --  AND AND l.letstat = 'A'
                AND c.lineflag = 'L'
                AND  l.letting ='&letting'
                AND l.CALL = '&call'
    ), BiddersInformation  AS
    -- This is where you make your changes for vendor name and vendor number Do not touch the above code
    -- It is always the same for any call number and letting date
    ( SELECT IPLINENO "BLine Number",
            MAX(CASE WHEN VENDOR='K020'  THEN bidprice ELSE NULL END) "K020:: Unit Price",
            MAX(CASE WHEN VENDOR='K020'  THEN bidprice ELSE NULL END) K,
            MAX(CASE WHEN VENDOR='H438'  THEN bidprice ELSE NULL END) "H438:: Unit Price",
            MAX(CASE WHEN VENDOR='H438'  THEN bidprice ELSE NULL END) H,
            MAX(CASE WHEN VENDOR='U010'  THEN bidprice ELSE NULL END) "U010:: Unit Price",
            MAX(CASE WHEN VENDOR='U010'  THEN bidprice ELSE NULL END) U,
            MAX(CASE WHEN VENDOR='G110'  THEN bidprice ELSE NULL END) "G110:: Unit Price",
            MAX(CASE WHEN VENDOR='G110'  THEN bidprice ELSE NULL END) G,
            MAX(CASE WHEN VENDOR='H530'  THEN bidprice ELSE NULL END) "H530:: Unit Price",
            MAX(CASE WHEN VENDOR='H530'  THEN bidprice ELSE NULL END) H1
        FROM  BIDTABS
        WHERE LETTING='&letting'
              AND CALL='&call'
              AND BIDPRICE <> 0
        GROUP BY IPLINENO
    SELECT BidItemsInformation."Line Number",
           BidItemsInformation."Section Number",
           BidItemsInformation."Item Number",
           BidItemsInformation."Description",
           BidItemsInformation."Unit",
           BidItemsInformation."Quantity",
           BidItemsInformation."Engineers Unit Price",
           BidItemsInformation."Engineers Estimate",
           BiddersInformation."K020:: Unit Price",
            (BidItemsInformation."Quantity" * K) "KGM CONTRACTORS INC",
           BiddersInformation."H438:: Unit Price",       
            (BidItemsInformation."Quantity" * H) "HOFFMAN CONSTRUCTION COMPAN",
           BiddersInformation."U010:: Unit Price",       
            (BidItemsInformation."Quantity" * U) "ULLAND BROTHERS INC",
           BiddersInformation."G110:: Unit Price",      
            (BidItemsInformation."Quantity" * G) "GLADEN CONSTRUCTION INC",
           BiddersInformation."H530:: Unit Price",      
            (BidItemsInformation."Quantity" * H1) "HOOVER CONSTRUCTION CO"
    FROM   BidItemsInformation,BiddersInformation
    WHERE  BidItemsInformation."Line Number" = BiddersInformation."BLine Number";
    Line Number     Section Number     Item Number     Description     Unit     Quantity     Engineers Unit Price     Engineers Estimate     K020:: Unit Price     
    0010     0001     2011601/00003     Construction Surveying     LS       1     143,000     143,000     75,000     75,000     67,080     67,080
    0013     0001     2013601/00010     Survey Equipment     LS       1     25,000     25,000     25,000     25,000     30,000     30,000
    0020     0001     2015601/00030     Blast Monitor/Survey     LS       1     50,000     50,000     30,000     30,000     35,000     35,000
    0030     0001     2021501/00010     Mobilization     LS       1     382,250     382,250     809,000     809,000     704,000     704,000
    0040     0001     2021602/00010     Well Survey     EACH     60     500     30,000     2,150     129,000     1,600     96,000
    0050     0001     2031501/00040     Field Office Type D     EACH     1     6,367     6,367     4,000     4,000     25,000     25,000
    sub total:
    1610     0002     2401501/01143     Structural Concrete (1a43)     C Y      46     350     16,100     408     18,768     400     18,400
    1620     0002     2401501/01362     Structural Concrete (1c62)     C Y      68     200     13,600     204     13,872     200     13,600
    1630     0002     2401501/03643     Structural Concrete (3y43)     C Y      60     600     36,000     592     35,520     580     34,800
    1640     0002     2401512/03633     Bridge Slab Concrete (3y33)     S F      1,876     24     45,024     28     51,778     27     50,652
    1650     0002     2401521/00030     Structure Excavation Class R     C Y      17     125     2,125     1,000     17,000     500     8,500
    1660     0002     2401541/00010     Reinforcement Bars     LB       2,490     2     3,735     1     3,312     1     3,237
    1670     0002     2401541/00011     Reinforcement Bars (Epoxy Coated)     LB       12,380     2     18,570     1     17,703     1     17,332
    1680     0002     2401601/00010     Structure Excavation     LS       1     2,500     2,500     2,000     2,000     5,000     5,000
    1690     0002     2402583/00020     Ornamental Metal Railing Type Special     L F      284     150     42,600     194     55,096     190     53,960
    sub total
    1820     0003     2401513/00346     Type Curb Railing Concrete (3y46)     L F      135     25     3,375     16     2,093     15     2,025
    1830     0003     2401513/07447     Type Mod P-4 (Tl-4) Railing Conc (3y46)     L F      302     85     25,670     72     21,593     70     21,140
    1840     0003     2401541/00010     Reinforcement Bars     LB       14,780     1     18,475     1     13,598     1     13,302
    1850     0003     2401541/00011     Reinforcement Bars (Epoxy Coated)     LB       76,720     1     103,572     1     85,926     1     84,392
    1860     0003     2401601/00010     Structure Excavation     LS       1     10,000     10,000     116,000     116,000     115,000     115,000
    1870     0003     2402583/00020     Ornamental Metal Railing Type Special     L F      132     150     19,800     184     24,288     180     23,760
    sub total
    total

    You can accomplish that using decode with the grouping function. It returns 1 when that column passed as argument was grouped (or is in some total) and 0 otherwise.
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> with t as
      2  (select 'New York' city, 'US' country, 1 num from dual
      3  union all select 'Los Angeles' city, 'US' country, 2 num from dual
      4  union all select 'London' city, 'GB' country, 2 num from dual
      5  union all select 'London' city, 'GB' country, 2 num from dual
      6  union all select 'London' city, 'GB' country, 7 num from dual)
      7  select decode(grouping(country), 0, country, 'GRAND TOTAL') country,
      8         decode(grouping(city), 0, city, decode(grouping(country), 0, 'SUBTOTAL')) city,
      9         sum(num) num_total
    10   from t
    11  group by rollup(country, city)
    12  /
    COUNTRY     CITY         NUM_TOTAL
    GB          London              11
    GB          SUBTOTAL            11
    US          New York             1
    US          Los Angeles          2
    US          SUBTOTAL             3
    GRAND TOTAL                     14
    6 linhas selecionadas.
    SQL>

  • Displaying subtotals for each group item in a Matrix or Group Matrix Report.

    Hi,
    I have generated a Report as follows:
    month1 month2 month3
    M1 R1 P1 x y z
    P2 a b c
    R2 P3 d e f
    M2 R3 P4 g h i
    R4 P5 k l m
    Is it possible to display the subtotals per each category as follows:
    month1 month2 month3
    M1 R1 P1 x y z
    P2 a b c
    -------------------------- x+a y+b z+c
    R2 P3 d e f
    ------------ (x+a)+d (y+b)+e (z+c)+f
    M2 R3 P4 g h i
    R4 P5 k l m
    ------------ g+k h+l i+m
    ---- ((x+a)+d) ((y+b)+e) ((z+c)+f)
    + (g+k) + (h+i) + (i+m)
    waiting for the solution desparately.

    Your digram isn't very clear. It looks like you have a matrix that is made up of:
    Across Group (G_Across) producing: month1, month2, month3
    Down Group (G_Down1) producing: M1, M2
    Down Group (G_Down2) producing: R1, R2, R3, R4
    Down Group (G_Down3) producing: P1, P2, P3, P4, P5
    and then you have the matrix cell values: x, y, z, a, b, ... m
    Basically, you want to introduce a summary column at the G_Down2 level that is a running summary, resetting at G_Across.
    To do this you need to create a matrix summary with the correct product order and reset value. The product order determines when the value is calculated. In your case, you want the value to be calculated: once Per G_Across, then once per G_Down1, then once per G_Down2. Leaving the reset value at "Report" will give you the subtotal values for all columns. You need to re-set this to G_Across since you want to only get a sub-total for each column.
    Steps:
    - Create a summary column in the data-model in the matrix group with the following:
    Name: CS_SubTotal
    Source: <your matrix cell column>
    Product Order: G_Across G_Down1 G_Down2
    Reset at: G_Across
    - increase the vertical size of G_Across to make room for the new field
    - increase the size of G_Down1 to fill up the space you've created
    - increase the size of G_Down2 to fill up the space you created
    - insert a field into this space (should be the matrix frame whose properties are:
    Vertical Repeating Frame: G_Down2
    Horizontal Repeating Frame: G_Across)
    - bring up the property palette against the field and set the source to: CS_SubTotal

  • How to have a unique value for each record??

    could any 1 help me out in this...
    I want to have a column name 'Order No' which should be unique.
    How to generate a unique value for each record.??

    could any 1 help me out in this...
    I want to have a column name 'Order No' which should be unique.
    How to generate a unique value for each record.?? If you are using SQL PLUS to create the table try something like
    this:
    CREATE TABLE ORDER_TEST (
    ORD_NO NUMBER (8) NOT NULL PRIMARY KEY,
    ORDERDATE DATE,
    CUSTID NUMBER (8) NOT NULL,
    SHIPDATE DATE,
    TOTAL NUMBER (8,2) CONSTRAINT TOTAL_ZERO CHECK
    (TOTAL >= 0),
    CONSTRAINT ORD_FOREIGN_KEY FOREIGN KEY (CUSTID) REFERENCES
    CUSTOMER (CUSTID),
    CONSTRAINT ORD_UNIQUE UNIQUE (ORD_NO)
    -- or a simpler table example
    DROP TABLE ORDER_TEST;
    CREATE TABLE ORDER_TEST (
    ORD_NO NUMBER (8),
    ORDERDATE DATE,
    CUSTID NUMBER (8) NOT NULL,
    SHIPDATE DATE,
    TOTAL NUMBER (8,2) CONSTRAINT TOTAL_ZERO CHECK
    (TOTAL >= 0),
    CONSTRAINT ORD_UNIQUE UNIQUE (ORD_NO)
    note: ORD_NO can also be a primary key
    If you are doing the INSERT during runtime from a form first
    create a sequence in SQL PLUS to handle the ORD_NO value:
    Create SEQUENCE ORDERNO_UNIQUEVAL_sqnc
    START WITH 000001
    NOMAXVALUE
    NOCACHE;
    and reference it as the ORD_NO parameter in your INSERT
    statement:
    ORDERNO_UNIQUEVAL_sqnc.NEXTVAL
    note: to maintain data integrity you must use the sequence
    everytime you insert a new order to table. To start a new
    sequence drop the sequence and re-create it with whatever "START
    WITH" value you want.
    Hope this helps
    Kevin

  • POS system reports daily totals for each store, not for each cashier

    Hi!
    We are implementing SAP Retail (ERP 6.0 EHP4 stack 3), SAP PI (Netweaver PI 7.1 SP 8) and SAP BW (NetWeaver 7.0 ehp1 stack 4, incl BI content 704, SP 3 ) for a client. Their POS system is a 3rd party system, i.e. not SAP POS.
    This issue concerns the fact that the POS system reports daily totals for each store, not for each cashier.
    At my client, the daily settlements are done for each cashier. At the end of day, we will get cash drawers counted with sum of each tender (cash and checks) at the end of day. In addition, the POS system will send sum of each tender, sum of all sales and sum of different finance transactions made each day. However, this u201Ctotals messageu201D is not sent separately for each workstation, or for each cashier, but rather for each store. So we only gets the totals per store.
    Questions:
    i)     Are the tasks available for comparing totals to the aggregates for POS transaction able to handle u201Cstore-only figuresu201D?
    ii)     If not, how can we adapt the tasks so they can handle u201Cstore-only figuresu201D?
    iii)     Can we trigger outbound tasks sending WPUUMS and WPUTAB using outbound dispatcher automatically, or must we run this as a manual task of an employee, after checking that all stores have delivered their totals?
    iv)     The u201Cstore-only figuresu201D does not include cashier statistics. Do we need the u201Ccashier statisticsu201D as total figures, or can we just populate the BAPI for each POS transaction with data, in order to populate BW infocubes for cashier statistics?
    Thanks for any advice !
    Best regards,
    Oeystein Emhjellen

    Hi Kees ...
    Your profile indicates you are running Leopard v10.5.8
    You need to upgrade to Snow Leopard V10.6 in order to use the App Store. This is an "upgrade", not an "update".
    Make sure your Mac meets Snow Leopard's requirements here.
    You must have the minimum of v10.6.6 installed in order to access the App Store.
    You can purchase Snow Leopard here > Mac OS X 10.6 Snow Leopard - Apple Store

  • I keep track of family totals for fundraising at a school, I want a family name and totals for each fundraiser and then at the end of the year I would like an alphabetized list.  Can I do this in numbers?

    in numbers, how would I make a line for each family (100+)  a column for each fundraiser. and at mid year, and year end be able to print an alphabetical listing?
    example:     entertainment books          Chip Shoppe       Yankee Candle
    Smith          $350                                   $245                    $100
    Total at the end of the line, but I could live without.  I am just trying to lose the paperwork, and have it in the ipad for when parents approach me at meetings.
    Help!

    HI m,
    Using Numbers '09 (the Mac version), I'd use a table with one header row and two header columns.
    Family     Total     Ent.Books     Chip S.     Y. Candle
    Smith, J      $695        350            245             100
    Jones, T      $765        250            445               70
    An ascending sort on column A will put the families in alphabetical order (and carry the rest of the row along with them).
    The formula =SUM(2) in B2, and filled down from there, keeps the total for each family right beside the family name.
    You could add a Footer row at the bottom to keep totals for each column. Formula for column B: =SUM(B)
    I would leave the currency signs ($) off the amounts—they just clutter up the table.
    This assumes that the features listed are all supported on Numbers for iOS, the version running on your iPad.
    Regards,
    Barry

  • How to use the different class for each screen as well as function.

    Hi Experts,
    How to use the different class for each screen as well as function.
    With BestRegards,
    M.Thippa Reddy.

    Hi ThippaReddy,
    see this sample code
    Public Class ClsMenInBlack
    #Region "Declarations"
        'Class objects
        'UI and Di objects
        Dim objForm As SAPbouiCOM.Form
        'Variables
        Dim strQuery As String
    #End Region
    #Region "Methods"
        Private Function GeRate() As Double
                Return Double
        End Function
    #End Region
    Public Sub SBO_Appln_MenuEvent(ByRef pVal As SAPbouiCOM.MenuEvent, ByRef BubbleEvent As Boolean)
            If pVal.BeforeAction = True Then
                If pVal.MenuUID = "ENV_Menu_MIB" Then
                End If
            Else ' Before Action False
                End If
        End Sub
    #End Region
    End Class
    End Class
    Rgds
    Micheal
    Vasu Anna Regional Feeling a???? Just Kidding
    Edited by: micheal willis on Jul 27, 2009 5:49 PM
    Edited by: micheal willis on Jul 27, 2009 5:50 PM

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • Device summary pane does not show capacitiy totals for each category (audio, remaining, photos, etc.)

    When viewing the summary pane for my ipod, the summary bar does not show totals for each category (audio, remaining, photos, etc.). It does not show when hovering over each category either. Seems to be some type of bug with itunes. I have tried re-installing itunes but that does not work. How do I fix this?

    Hello vetsrini.
    Thanks a lot for your kind reply. As i said, i'm new to this and sometimes i just cannot pass over some problems. Here are the fields i have inserted:
    <?for-each:LIST_G_SETUP/AS_OF_DATE?>
    <?end for-each?>
    <?for-each@section:G_CUST_INV?>
    <?for-each:G_1?>
    <?INVNUM?>
    <?INVOICE_TYPE_INV?>
    <?DUE_DATE_INV?>
    <?sum (C_INV_BALANCE)?>
    <?sum (C_INV_B0)?>
    <?sum (C_INV_B1)?>
    <?sum (C_INV_B2)?>
    <?sum (C_INV_B3)?>
    <?sum (C_INV_B4)?>
    <?sum (C_INV_B5)?>
    <?end-for-each-group?>
    <?TOTAL_INV_AMT_DSP?>
    <?TOTAL_INV_B0_DSP?>
    <?TOTAL_INV_B1_DSP?>
    <?TOTAL_INV_B2_DSP?>
    <?TOTAL_INV_B3_DSP?>
    <?TOTAL_INV_B4_DSP?>
    <?TOTAL_INV_B4_DSP?>
    <?end for-each:G_CUST_INV?>
    In the header of the template i also have <?CUST_NAME_INV?> and the report date. When i try to enter the <?AS_OF_DATE?> it is not printed and also the header is not shown any longer. Once again, thank you for any help,
    Octavio

Maybe you are looking for