Need solution for YTD report

What is a simple solution to reporting on YTD gifts for a series of years. I know there are many ways to do this. I want to avoid unnecessary datatype conversion and have it work on the basis of relative dates.
The fiscal year starts 6/1 and ends 5/31. The report would ask for an ending date as a parameter. If the parameter is 9/31/07 the ranges for the condition would be:
gifts between 6/1/03 and 9/31/03 or
gifts between 6/1/04 and 9/31/04 or
gifts between 6/1/05 and 9/31/05 or
gifts between 6/1/06 and 9/31/06 or
gifts between 6/1/07 and 9/31/07
If the parameter is 1/31/07 the ranges for the condition would be:
gifts between 6/1/02 and 1/31/03 or
gifts between 6/1/03 and 1/31/04 or
gifts between 6/1/04 and 1/31/05 or
gifts between 6/1/05 and 1/31/06 or
gifts between 6/1/06 and 1/31/07
Thanks for any help

yeshavanth, pls ask this in reports forum

Similar Messages

  • Need solution for a Reporting Requirement

    Hello Experts,
    I need design a solution for Report, where in I need to show ageing of Invoice based of Due date of Invoice for last four weeks as explained below:
    In cube i have records like this:
    Industry       Invoice Number      Due Date      Amount
    8111                   IV1                  13/04/2011  1000
    8111                   IV2                  17/04/2011  1000
    Say current week end date is 03/05/2011, now I need to show data for last 4 weeks in report, by calculting what is due at that weekend date e.g. there is no amount due on 12/04/2011, but next week on 19th amount due in 1000, then subsequent week there are 2 Inv. due, amount for 26th is 2000. Similarly there is additional invoice after 26th, so amount on 3rd remains the same i.e. 2000.
    Industry    Week End date  AR Amount due
    8111     12/04/2010     0
    8111     19/04/2010     1000
    8111     26/04/2010     2000
    8111     03/05/2010     2000
    Please let me know what is the best solution to achive this, as data volume would be high i.e.
    1. In Bex query, is this can be done, if yes how?
    2. Or we need to do this in EDW, by having additonal cube, if yes how?
    Please let me know if you have solution for this.
    Regards,
    Vipul

    Hi All,
    Thanks for the replies.
    Please tell me if I can call a file sender communication channel from an UDF and pass the dinamic configuration values at runtime.
    If this is possible, I think the above requirement is addressed.
    Please tell me in case of any more solutions too.
    Thanks once again.
    Regards.

  • Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    Need solution for the following sync error: "iTunes could not sync calendars to the iPad "iPad name" because an error occurred while sending data from the iPad"

    I want to add that I deleted all the old back-ups and created a new back-up without any issues except sync problem.

  • Amend previous solution for YTD totals:  need PTD also

    Last week I received help on getting YTD totals on a 5 week period-to-date report. Data and solution are below.
    I've got a period to date report with following columns:
    week1 tots, week2 tots, week3 tots, week4 tots, week5 tot, period-to-date tots, year-to-date tots
    The records for one hot dog stands looks like in the following format:
    HOT_DOG_STAND_ID       WEEK_NBR               NET_SALES2             BUNS24434              PICKELS_AW38           MUSTARD_TB56           CHICKENHEADS33         PIECES_SOLD34          SCRAPS35               PIECES_UNACCOUNTED     HEAD_AVERAGE           EFFICIENCY            
    141                    0                      647064.59              691287.4               149142.91     
    141                    1                      697227.09              694887.4               139149.31             
    141                    2                      293067.04              344887.4               159159.91             
    141                    3                      693467.09              695687.5               139149.91             
    141                    4                      644067.09              595487.4               635149.94 
    141                    5                      644067.09              595487.4               635149.94               
    141                    7                     6897467.09            12694887.6             34139169.34                                Week nbr 0 is sum of weeks from beginning of year to the end of previous period
    week 1 - 5 are the totals for each week in the period
    week 7 represents the the year to date total
    (totals for #7 are only for display and are not correct)
    I was not concerned with PTD totals (sum of weeks 1 to 5); I simply UNION ALL'ed a second SELECT from first query summing on week 1 - 5
    The client program throws error:
    "unsupported case for inlining of query name in WITH clause". Googling suggest it is most likely most likely because of the UNION ALL
    So I do need to get the PTD totals in a record with Week number 6.
      CREATE TABLE PERIOD_DATA
       (     "HOT_DOG_STAND_ID" NUMBER NOT NULL ENABLE,
         "WEEK_DATE" DATE,
         "NET_SALES2" NUMBER,
         "BUNS24434" NUMBER,
         "PICKELS_AW38" NUMBER,
         "MUSTARD_TB56" NUMBER,
         "CHICKENHEADS33" NUMBER,
         "PIECES_SOLD34" NUMBER,
         "SCRAPS35" NUMBER,
         "PIECES_UNACCOUNTED" NUMBER
    REM INSERTING into PERIOD_DATA
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('29-DEC-08','DD-MON-RR HH.MI.SSXFF AM'),14301.39,13951.26,3431.13,0,3680,2484,378,818);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('05-JAN-09','DD-MON-RR HH.MI.SSXFF AM'),14651.37,14651.37,3249.55,0,3200,2419,505,276);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('12-JAN-09','DD-MON-RR HH.MI.SSXFF AM'),14169.89,14169.89,2463.53,0,3136,2080,474,582);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('19-JAN-09','DD-MON-RR HH.MI.SSXFF AM'),15864.46,15864.46,3245.49,0,3472,2764,475,233);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('26-JAN-09','DD-MON-RR HH.MI.SSXFF AM'),15961.2,15916.23,3395.51,0,3648,2838,392,418);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('02-FEB-09','DD-MON-RR HH.MI.SSXFF AM'),19066.4,19066.4,4165.07,0,4336,3682,333,321);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('09-FEB-09','DD-MON-RR HH.MI.SSXFF AM'),18415.74,18415.74,4024.74,0,4032,3365,482,185);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('16-FEB-09','DD-MON-RR HH.MI.SSXFF AM'),18014,17849,3486.33,0,3840,3238,374,228);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('23-FEB-09','DD-MON-RR HH.MI.SSXFF AM'),18671.09,18626.12,3729.42,0,3888,2970,353,565);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('02-MAR-09','DD-MON-RR HH.MI.SSXFF AM'),17636,17636,3815,0,3424,2840,490,94);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('09-MAR-09','DD-MON-RR HH.MI.SSXFF AM'),17235.52,17145.58,3897.42,0,3504,2928,421,155);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('16-MAR-09','DD-MON-RR HH.MI.SSXFF AM'),15989.27,15989.27,3372.95,0,3728,3051,369,308);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('23-MAR-09','DD-MON-RR HH.MI.SSXFF AM'),19067.69,18960.41,4152.6,0,4048,3293,442,313);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('30-MAR-09','DD-MON-RR HH.MI.SSXFF AM'),18717.99,18717.99,3923.69,0,4408,3219,593,596);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('06-APR-09','DD-MON-RR HH.MI.SSXFF AM'),17335.16,17335.16,3769.08,0,3928,2997,514,417);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('13-APR-09','DD-MON-RR HH.MI.SSXFF AM'),18967.39,18967.39,4157.76,0,4144,2991,527,626);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('20-APR-09','DD-MON-RR HH.MI.SSXFF AM'),23090.88,23090.88,4427.96,0,5544,4493,560,491);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('27-APR-09','DD-MON-RR HH.MI.SSXFF AM'),24197.98,24132.99,4248.66,0,6680,5190,606,884);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('04-MAY-09','DD-MON-RR HH.MI.SSXFF AM'),20202.21,20137.22,3714.68,0,7052,6170,422,460);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('11-MAY-09','DD-MON-RR HH.MI.SSXFF AM'),18514.48,18514.48,3266.06,0,5508,4178,571,759);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('18-MAY-09','DD-MON-RR HH.MI.SSXFF AM'),18678.68,18678.68,3814.07,0,5824,4345,633,846);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('25-MAY-09','DD-MON-RR HH.MI.SSXFF AM'),17937.18,17937.18,3051.52,0,4844,4986,529,-671);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('01-JUN-09','DD-MON-RR HH.MI.SSXFF AM'),17445.75,17445.75,3079.91,0,5028,4810,656,-438);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('08-JUN-09','DD-MON-RR HH.MI.SSXFF AM'),17327.88,17327.88,3263.29,0,6112,4674,672,766);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('15-JUN-09','DD-MON-RR HH.MI.SSXFF AM'),17241.72,16937.33,3328.27,0,5792,4490,567,735);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('22-JUN-09','DD-MON-RR HH.MI.SSXFF AM'),16625.83,16625.83,3485.18,0,5408,4319,761,328);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('29-JUN-09','DD-MON-RR HH.MI.SSXFF AM'),17002.84,17002.84,3091.09,0,5664,4369,544,751);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('06-JUL-09','DD-MON-RR HH.MI.SSXFF AM'),16339.19,16274.2,3075.3,0,4784,3440,697,647);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('13-JUL-09','DD-MON-RR HH.MI.SSXFF AM'),17165.12,16885.14,3458.03,0,4320,3296,640,384);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('20-JUL-09','DD-MON-RR HH.MI.SSXFF AM'),17029.77,16899.79,3198.91,0,4448,3449,645,354);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('27-JUL-09','DD-MON-RR HH.MI.SSXFF AM'),16596.89,16596.89,3015.54,0,4624,3288,665,671);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('03-AUG-09','DD-MON-RR HH.MI.SSXFF AM'),16468.58,16468.58,2981.35,0,2224,3495,564,-1835);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('10-AUG-09','DD-MON-RR HH.MI.SSXFF AM'),18625.48,18550.5,3524.44,0,4856,3482,578,796);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('17-AUG-09','DD-MON-RR HH.MI.SSXFF AM'),24538.54,24323.55,5580.71,0,5260,3771,608,881);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('24-AUG-09','DD-MON-RR HH.MI.SSXFF AM'),18081.37,18081.37,3533.45,0,5980,3080,553,2347);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('31-AUG-09','DD-MON-RR HH.MI.SSXFF AM'),17183.25,17183.25,3487.12,0,2544,3262,615,-1333);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('07-SEP-09','DD-MON-RR HH.MI.SSXFF AM'),17688.41,17575.29,3424.17,0,4800,3480,591,729);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('14-SEP-09','DD-MON-RR HH.MI.SSXFF AM'),18211.29,18211.29,3806.32,0,3968,3104,527,337);
    Insert into PERIOD_DATA (HOT_DOG_STAND_ID,WEEK_DATE,NET_SALES2,BUNS24434,PICKELS_AW38,MUSTARD_TB56,CHICKENHEADS33,PIECES_SOLD34,SCRAPS35,PIECES_UNACCOUNTED) values (141,to_timestamp('21-SEP-09','DD-MON-RR HH.MI.SSXFF AM'),16809.21,16744.22,3014.61,0,4128,3124,710,294);
    SELECT HOT_DOG_STAND_ID
    , DECODE(TRUNC(week_date , 'iw') ,
             to_date('24-AUG-09' , 'dd-mon-rr') , 1 ,
             to_date('24-AUG-09' , 'dd-mon-rr') + 7 , 2 ,
             to_date('24-AUG-09' , 'dd-mon-rr') + 14 , 3 ,
             to_date('24-AUG-09' , 'dd-mon-rr') + 21 , 4 ,
             to_date('24-AUG-09' , 'dd-mon-rr') + 28 , 5 , 0) AS week_nbr
    , SUM(NET_SALES2)                                                                                                                                                                                                                                                     AS net_sales2
    , SUM(BUNS24434 ) BUNS24434
    , SUM(PICKELS_AW38) PICKELS_AW38
    , SUM(MUSTARD_TB56) MUSTARD_TB56
    , SUM(CHICKENHEADS33) CHICKENHEADS33
    , SUM(PIECES_SOLD34) PIECES_SOLD34
    , SUM(SCRAPS35) SCRAPS35
    , SUM(PIECES_UNACCOUNTED) * - 1 PIECES_UNACCOUNTED
       /*--== Head average  net_sales / chickenusage*/
    , CASE
          WHEN NVL( SUM(ChickenHeads33) / 8 , 0) = 0 THEN 0
          ELSE ROUND(SUM(net_sales2) / ( SUM(ChickenHeads33) / 8 ) , 2)
       END AS Head_average
       /*--=== Efficiency =   (ChickenUsage  - scrappedDiv8 - unaccountedDiv8) / ChickenUsage)  * 100*/
    , CASE
          WHEN NVL(SUM(ChickenHeads33) / 8 , 0) = 0 THEN 0
          ELSE ROUND((((SUM(ChickenHeads33) / 8 ) - ( SUM(scraps35) / 8 ) - (SUM(pieces_unaccounted) / 8 )) / (SUM(ChickenHeads33) / 8 )) * 100 , 2)
       END AS efficiency
    FROM period_data per
    WHERE week_DATE BETWEEN TRUNC(TO_DATE( '24-AUG-09' , 'DD-MON-YY') , 'IY') AND TRUNC(TO_DATE( '24-AUG-09' , 'DD-MON-YY') , 'IW') + 6 + 7 * 4
    GROUP BY hot_dog_stand_id
    , DECODE(TRUNC(week_date , 'iw') ,
          to_date('24-AUG-09' , 'dd-mon-rr') , 1 ,
          to_date('24-AUG-09' , 'dd-mon-rr') + 7 , 2 ,
          to_date('24-AUG-09' , 'dd-mon-rr') + 14 , 3 ,
          to_date('24-AUG-09' , 'dd-mon-rr') + 21 , 4 ,
          to_date('24-AUG-09' , 'dd-mon-rr') + 28 , 5 ,
          0)
    ORDER BY DECODE(TRUNC(week_date , 'iw') , to_date('24-AUG-09' , 'dd-mon-rr') , 1 , to_date('24-AUG-09' , 'dd-mon-rr') + 7 , 2 , to_date('24-AUG-09' , 'dd-mon-rr') + 14 , 3 , to_date('24-AUG-09' , 'dd-mon-rr') + 21 , 4 , to_date('24-AUG-09' , 'dd-mon-rr') + 28 , 5 , 0);The following was the successful solution: see: Need help getting YTD total
    VARIABLE   start_date     VARCHAR2 (11);
    EXEC         :start_date  := '24-AUG-2009';
         SELECT  HOT_DOG_STAND_ID
         ,      NVL (CASE
                   WHEN  week_date >= TO_DATE( :start_date, 'DD-MON-YYYY')
                   AND   week_date <  TO_DATE( :start_date, 'DD-MON-YYYY') + 35
                   THEN  1 + FLOOR ( (week_date - TO_DATE( :start_date, 'DD-MON-YYYY'))
                                             / 7
                   ELSE  0
                      END
                 , 7
                 )          AS week_nbr
    , SUM(NET_SALES2)                                                                                                                                                                                                                                                     AS net_sales2
    , SUM(BUNS24434 ) BUNS24434
    , SUM(PICKELS_AW38) PICKELS_AW38
    , SUM(MUSTARD_TB56) MUSTARD_TB56
    , SUM(CHICKENHEADS33) CHICKENHEADS33
    , SUM(PIECES_SOLD34) PIECES_SOLD34
    , SUM(SCRAPS35) SCRAPS35
    , SUM(PIECES_UNACCOUNTED) * - 1 PIECES_UNACCOUNTED
       /*--== Head average  net_sales / chickenusage*/
    , CASE
          WHEN NVL( SUM(ChickenHeads33) / 8 , 0) = 0 THEN 0
          ELSE ROUND(SUM(net_sales2) / ( SUM(ChickenHeads33) / 8 ) , 2)
       END AS Head_average
       /*--=== Efficiency =   (ChickenUsage  - scrappedDiv8 - unaccountedDiv8) / ChickenUsage)  * 100*/
    , CASE
          WHEN NVL(SUM(ChickenHeads33) / 8 , 0) = 0 THEN 0
          ELSE ROUND((((SUM(ChickenHeads33) / 8 ) - ( SUM(scraps35) / 8 ) - (SUM(pieces_unaccounted) / 8 )) / (SUM(ChickenHeads33) / 8 )) * 100 , 2)
       END AS efficiency
    FROM period_data per
    WHERE week_DATE BETWEEN TRUNC(TO_DATE( '24-AUG-09' , 'DD-MON-YY') , 'IY') AND TRUNC(TO_DATE( '24-AUG-09' , 'DD-MON-YY') , 'IW') + 6 + 7 * 4
    GROUP BY  hot_dog_stand_id
    ,           ROLLUP (
                 CASE
                   WHEN  week_date >= TO_DATE( :start_date, 'DD-MON-YYYY')
                   AND   week_date <  TO_DATE( :start_date, 'DD-MON-YYYY') + 35
                   THEN  1 + FLOOR ( (week_date - TO_DATE( :start_date, 'DD-MON-YYYY'))
                                             / 7
                   ELSE  0
                 END          -- week_nbr
    ORDER BY  week_nbr
    ;Thanks in advance .

    Frank Kulash wrote:
    Hi,
    There's probably a way to get both the year-to-date and the period_to_date totals using ROLLUP, but I don't know what that is.I replaced your WITH statement with
    --== ABBREVS: beginning-of-week, period-week-nbr, beginning-of-period, beginning-of-period-last-year
    with report_dates as
    select '24-AUG-09' gamedate, '239' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '25-AUG-09' gamedate, '240' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '26-AUG-09' gamedate, '241' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '27-AUG-09' gamedate, '242' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '28-AUG-09' gamedate, '243' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '29-AUG-09' gamedate, '244' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '30-AUG-09' gamedate, '245' week_nbr, '24-AUG-09' bow, '25-AUG-08' bow_ly, 9 per_nbr, 1 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '31-AUG-09' gamedate, '246' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr,  2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '01-SEP-09' gamedate, '247' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '02-SEP-09' gamedate, '248' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '03-SEP-09' gamedate, '249' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '04-SEP-09' gamedate, '250' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '05-SEP-09' gamedate, '251' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '06-SEP-09' gamedate, '252' week_nbr, '31-AUG-09' bow, '01-SEP-08' bow_ly, 9 per_nbr, 2 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '07-SEP-09' gamedate, '253' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '08-SEP-09' gamedate, '254' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '09-SEP-09' gamedate, '255' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '10-SEP-09' gamedate, '256' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '11-SEP-09' gamedate, '257' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '12-SEP-09' gamedate, '258' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '13-SEP-09' gamedate, '259' week_nbr, '07-SEP-09' bow, '08-SEP-08' bow_ly, 9 per_nbr, 3 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '14-SEP-09' gamedate, '260' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '15-SEP-09' gamedate, '261' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '16-SEP-09' gamedate, '262' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '17-SEP-09' gamedate, '263' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '18-SEP-09' gamedate, '264' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '19-SEP-09' gamedate, '265' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '20-SEP-09' gamedate, '266' week_nbr, '14-SEP-09' bow, '15-SEP-08' bow_ly, 9 per_nbr, 4 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '21-SEP-09' gamedate, '267' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '22-SEP-09' gamedate, '268' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '23-SEP-09' gamedate, '269' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '24-SEP-09' gamedate, '270' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr , 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '25-SEP-09' gamedate, '271' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '26-SEP-09' gamedate, '272' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '27-SEP-09' gamedate, '273' week_nbr, '21-SEP-09' bow, '22-SEP-08' bow_ly, 9 per_nbr, 5 per_week_nbr, '24-AUG-09' bop, '25-AUG-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                   
    select '28-SEP-09' gamedate, '274' week_nbr, '28-SEP-09' bow, '29-SEP-08' bow_ly, 10 per_nbr,  1 per_week_nbr, '28-SEP-09' bop, '29-SEP-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                  
    select '29-SEP-09' gamedate, '275' week_nbr, '28-SEP-09' bow, '29-SEP-08' bow_ly, 10 per_nbr,  1 per_week_nbr, '28-SEP-09' bop, '29-SEP-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                  
    select '30-SEP-09' gamedate, '276' week_nbr, '28-SEP-09' bow, '29-SEP-08' bow_ly, 10 per_nbr, 1 per_week_nbr, '28-SEP-09' bop, '29-SEP-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual union all                                                                                                                  
    select '01-OCT-09' gamedate, '277' week_nbr, '28-SEP-09' bow, '29-SEP-08' bow_ly, 10 per_nbr, 1 per_week_nbr, '28-SEP-09' bop, '29-SEP-08' bop_ly, '29-DEC-08' boy, '29-DEC-07' boy_ly from dual                                                                                                               
    )which allowed me to substitute (see the func DDL below):
    ,  nvl( case
                  when week_date < dates.bop then 0
                  else fnc_get_per_week_nbr(week_date)
                end
            , 7)  as week_nbrThis is where i got stuck but I'm sure I was on right track
    with report_dates as
    --=== INSERT WITH CLAUSE FROM ABOVE ===---                                                             
    SELECT  HOT_DOG_STAND_ID
             --== when week_date < beginning of period then week nbr = 0 to representing beginning of year to end of previous period
           ,  nvl( case
                  when week_date < dates.bop then 0
                  else fnc_get_per_week_nbr(week_date)
                end
            , 7)  as week_nbr
    , SUM(NET_SALES2)   NET_SALES2                                                                                                                                                                                                                                                  AS net_sales2
    , SUM(BUNS24434 ) BUNS24434
    , SUM(PICKELS_AW38) PICKELS_AW38
    , max(sum(net_sales2))  over partition by(  ??? where week_nbr in (1,2,3,4,5) net_sales2_ptd
    , max(sum(BUNS24434))  over partition by(  ??? where week_nbr in (1,2,3,4,5) BUNS24434_ptd
    , max(sum(PICKELS_AW38))  over partition by(  ??? where week_nbr in (1,2,3,4,5) PICKELS_AW38_ptd
    FROM period_data per
    inner join report_dates dates on dates.game_date = TO_DATE( '26-AUG-09' , 'DD-MON-YY')
    WHERE week_DATE BETWEEN dates.boy AND to_date(dates.bow, 'dd-mon-yy') + 6
    GROUP BY  hot_dog_stand_id
    ,    ROLLUP (
                    case
                  when week_date < dates.bop then 0
                  else fnc_get_per_week_nbr(week_date)
                end
    ORDER BY  week_nbr
    ;As a footnote, in my live database, reports_tables is a table, so I cleaned up main SELECT with the referenced function:
    create or replace FUNCTION fnc_get_per_week_nbr(dte IN date)
    RETURN number IS
    out_week_nbr  number;
    BEGIN
    --== ABBREVS: beginning-of-week, period-week-nbr, beginning-of-period, beginning-of-period-last-year
    with report_dates as
                ---== Replace with Select statements to have sample data for func ==--                                                                                                         
    select per_week_nbr into out_week_nbr from report_dates where game_date =  dte;
         return out_week_nbr;
    END fnc_get_per_week_nbr;
    Without the correct desired results, I can't be sure if this is right.
    Your results were correct, totals and all. Thank you.
    There was a lot of unnecessary dividing by 8 going on.
    x / 8 = 0 if and only if x = 0, so there's no need to divide by 8 when testing for division by 0.
    (a/8) / (b/8) = a / b, so there's no need to divide by 8 at all when computing efficiency.
    thanks I had missed that.

  • Need solution for dynamic pick lists in Crystal Reports

    Does anyone have a good solution for creating a dynamic pick list for a Crystal Report that is based off of a BW Query without having to use a BW user input variable? In many cases it is not practical to use a BW variable to generate a dynamic pick list due to the high number of possible member values and the highly dynamic nature of the particular characteristic (customers, materials, etc.).  In my understanding the LOV Server is not an option when dealing with SAP BW.  Anyone else running into this issue with Crystal and SAP BW?

    Hi Mike,
    we once solved this by creating LOVs in BusinessView Manager. I am not sure if you can use the BW Publisher in this scenario as we did not use it. We published the reports directly to the BOE server for some reasons.
    Creating a LOV in BusinessView manager is really easy. You can create cascading prompts, shedule refreshing of the lists, ...
    By using the cascading prompt feature you can make prompts like this:
    First enter the customer number (or pick it from a list) and then the second list, which holds the materials only has shows the ones which had been purchased by that customer. I think this is what you are looking for.
    You should give it a try!
    Thorsten

  • BW solution for ABAP Reports

    Hi All,
    I have a client which implemented SAP R/3 and they have certain standard reports like MB5B, VA05 and certain zreports. Now my task is to propose a BW solution for that client. What will be the steps that needs to be done to accomplish this task. help in this regards will be appreciated and awarded.
    Thanks all.

    Hi Pratibha,
    If there are too many reports that need to be reproduced in BW then you can club similar reports or belonging to a particular module. And then built datasources for them.
    If there very few reports,
    1. Find out the program behind the ABAP reports
    2. Build a zprogram for the output and put into an FM.
    3. Create a direct update DSO in BW on the FM
    Let me know if it helps or not.
    -Bikas

  • Need Solutions for these Errors

    <b>Hello Group !
        How are you people there.Iam very much thank full to you people for your constant support.
    I need solution to these errors:</b>
         1.SID missing.
         2.Idocs Missing or No Idocs arrived from source
            System.
         3.Errors in the source system
         4.Missing messages at transfer rules or
           Update rules.
         5.Data sent but not received.
         6.Errors in the source system.
        Have a nice week end
        Vijay

    Hi,
    1. Missing SIDS : Mostly occurs due to missing master data or if error records are parked and not loaded susequently, or if Master data is not loaded before loading Transaction data. You need to fix these situations.
    2. Missing Idocs -Canbe due to idocs getting stuck, rfc connection failures, bad idocs, partner profies missing or deactivated. need to correct these errors on the source side.
    3.Source system errors - Jobs on source system failed or are slow.idoc errors. Source system crashing. Problems in generic extractions. Problems with update jobs. Data not getting posted to Delta queues. Data not coming through correctly after DS enhancement. Data posting errors to infostructures are some of the errors you'll face on the source system side.
    4. Missing messages again can be due to jobs being slow, processes being killed, or warning messages. Need to treat the warning messages or reset the job.
    5. Can be due to IDOC errors. Goto SM58 and push data packets from there on the source system side or due to IDOC errors.
    6. Same as 3.
    Cheers,
    Kedar

  • Need Solution for iWeb/QuickTime viewing problem in IE 6 for Windows

    When viewing an iWeb page in IE 6 for Windows with a background picture and a QuickTime movie embeded, the QT movie frame will "smear" when the page is scrolled. More specifically, The QT movie frame will not lock into its proper position as long as the page has a background picture selected in iWeb when viewing w/ IE 6 for Windows. Does anyone know of a solution for this? Does this problem still exist w/ later versions of IE for Windows?
    By the way, if you don't already know this, changing the Page Background setting back to the default of 'Color Fill' in iWeb and republishing will not correct the problem once a background picture is selected for a page. You have to set the Page Background setting to 'None' and republish. The movie frame will then be locked into place when scrolling the page in IE 6 for Windows.
    MBP 17in (1 GB RAM), PB G4 15in, PB G4 12in, iMac G3   Mac OS X (10.4.7)   Loyal to Apple since the Apple ][+

    Someone else posted that you may have to remove the image altogether, publish, then place the replacement image. The images for the background of my newest pages use this as a tiled background successfully.
    http://web.mac.com/makentosh/iWeb/tipsfromtheiceberg/Images/background.jpg
    I'm not sure how well tiling would work on your page though since it would begin to repeat vertically when you don't want it to (for me, tiling is exactly what I needed).

  • I need solution for this query

    hi all,
    could anyone please send me solution for this query these are the database tables am having
    TABLE NAME :USERS
    ATTRIBUTES
    UNAME
    PASSWORD
    GROUPNAME
    TABLE NAME:GROUPS
    ATTRIBUTES
    GROUPID
    GROUPNAME
    my requirement is that i need 2 acces the groupname of a particular user and the reamining groups to which i doesn't belong in A SINGLE QUERY
    my result needs to be like this
    Authorised group
    consultant
    UNAuthorised groups
    sales
    vender
    recruiter
    admin
    if any body got the solution please send

    hi All,
    I have 3 tables 1)PREVILEGES (groupname, previleges(values y or n only))
    2)GROUPS (groupid, groupname)
    3) USERS (uname, groupname).
    Here each user belongs to one group, each user hav a default previlege means example if user is consutant then he can access only consultant group. Means default previlege will be used. For default previleges, there is no record in Previleges table.
    The Problem is that, I need to reterive the groupname from users which de doesn't belong as well as his previleges from previleges, If there is no values in previleges in the table it should return n. or value what is therey.
    the different groups are
    SALES,CONSULTANT,VENDER,RECRUTER,ADMIN

  • Need solution for this query

    i want solution for shape & append query as run in access for oracle
    RS.Open "SHAPE {select ID,MAX(Module_Name) AS MainMenu from USER_MODULE GROUP BY ID} APPEND ({select ID,NAME,USER_module.srno,iif(right(param_str,1)='P','ü','') as Allow,iif(left(param_str,1)='A','ü','') as Ins,iif(MID(param_str,2,1)='E','ü','') as Edit,iif(MID(param_str,3,1) = 'D','ü','') as Del,flag,CODE,NAME from USER_MODULE left join user1 on user1.srno=USER_module.srno where user_name='" & Master_Rst!USER_NAME & "' or user_name is null} RELATE ID TO ID) AS AA", G_CompCn, adOpenDynamic, adLockOptimistic

    If you are in migration from one DB to other - you should not go with one to one convertion.
    First understand the business requirment - whats working and how is it working and whats expected out of your new code etc.
    Then decide what to place and how using your new DB.
    There might not be one to one exact match in all DBs.
    Simple example if you find any connect by prior in oracle - can you replace it with simple SQL command in ACCESS / SQL SERVER as it is without any functions?

  • Need solutions for Budget, Landed cost and difference in 2005b and 2007B

    Hi all,
    Need help for the following scenarios
    1. How to define budget for Purchase order and cost centers
    2. Landed Cost in SAP B1 2007 how do we do? I am getting an error message stating that Landed cost allocation account is not defined....
    3. Difference in 2005B and 2007B
    Regards
    Shashi

    Thankyou Jasper,
    Landed cost problem has been solved.
    Regarding Budget set up My client need Budget at costcenter level. i.e Cost center wise they want the budget. As of my knowledge to do this we need to activate Account segmentation right?
    Without doing that is there any other way where we can set Budget cost center level also?
    one more thing, there is a check box of purchase order, Goods Receipt and Accounting at the time of setting up Budget in General setting? what it is for?
    Regariding difference in 2005b and 2007B I was not able to get documentation on this.
    Regards
    Shashi

  • Need solution for solving TIME_WAIT in TCP/IP ports in Windows Server 2008 Standard Service Pack 2

    In one of our windows machine( OS : Windows Server 2008 Standard (Service Pack 2)-32bit), we are facing TIME_WAIT in all the TCP/IP ports and it is not getting closed.
    On analyzing the issue, we found solution for this from the below link,
    https://support.microsoft.com/en-us/kb/2553549
    In this page, we are able to get the hotfix for Windows Server2008 R2 SP1 but i can't able to get for  Windows Server 2008 Standard SP2(32bit). If we try to apply the hotfix vailable for SP1, it is showing "The update does not apply to your System".
    Kindly provide us the solution for solving TIME_WAIT issue in the machine. 
    OS Details : Microsoft Windows Server 2008 Standard
    Version : 6.0.6002 SP2 Build 6002
    System Type : 32 bit(x86-based PC)
    Awaiting for the response.
    Thank you,
    Pushpalatha.A

    Download correct version from Microsoft Update Catalog. Run it with elevated rights.
    M.

  • Need solution for multiple Firewire needs

    My new 27" 2011 imac will arrive next Monday. I'm now trying to define and solve all potential hurdles.
    I seek recommendations on how to best solve my need to attach 2 original  firewire cables, into this imac that only comes with 1 firewire 800 input. Both connectors are critical to my  work. One connector will turn hard to the right for about six feet to connect to my Digi02 audio interface. The other cable connects and turns hard to the left for 15 feet to connect to my Epson 2200 art printer. Both of the outboard equipment need the original firewire.
    I have considered daisy chaining the audio interface and the printer. Except they are on opposite sides of my studio, and I prefer NOT to use a 25 foot firewire cable between such critical peices of hardware.
    A better possibility may be a firewire hub, although it will probably also need adaptors for the different versions of firewire i need. That seems rather inelegant. Another possibility would be to get one USB to firewire adaptor and one firewire to 800 adaptor. Do these USB to firewire adaptors work OK? 
    Anyway, which of these methods would you recommend as my best choice? Are there other choices i haven't mentioned here?

    The guy is totally correctin his review.
    That is how FireWire works. The FireWire bus will run only as fast as the slowest device on the bus. So as soon as plug in a FW400 device, everything is then clocked down to 400FW.
    If you need to have both FW800 and FW400 devices running at their native speeds you need two FW busses each with their own controller.
    Because of the limited expansion capability of the iMac, I don't see any way for you to get around this limitation.
    If you get a Mac Pro then you could use a FW PCIe card for the second bus and controller.
    Allan

  • Need solution for opening multiple connection to server in parallel

    Hi..
    I have used URL and URLConnectin classes to open connection to server,
    and i used URLConnection.getInputStream( ) to download HTML pages.
    Now my requirement is to open more than one connecton to single HTML document and download the file in parallel.
    for example, if the HTML file size is 60KB..then i open three connection and
    connection 1 downloads first 20KB
    connection 2 downloads second 20KB
    connection 3 downloads final 20KB
    all the above should be done in parallel....by threading or else..
    first of all i want to know is it possible to do the above in java?
    anybody having solution for the above requirement?
    venu

    hi,
    i too have the same problem
    actually i am designing a download manager ,and had the same problem
    that how to put multiple threads for doing it ,,,,
    have u got solution for it..
    if so please help me..
    my mail id is [email protected]
    i want help in designing the download manager
    can any one help me out plzzzzzzzzzzzzzz
    bye

  • Need solution for Report

    HI
    In report i want to find frame(heading the columns ) is displaying in how many pages please give me a solution
    Regards
    Yashavanth

    yeshavanth, pls ask this in reports forum

Maybe you are looking for

  • .dmg files no longer open in the finder

    I just did an archive and reinstall (to solve some unrelated problems). Most things seem fine, but now .dmg files show up on the desktop without any icon, and when I double click them they open Disk Utility instead of mounting in the finder. It's pos

  • Use of getAnnotation

    Hi, I have some problems with the use of getAnnotation(). I want to get the Annotation (Type Documented) of a class. I tried the following code: Documented annotation = myClass.getAnnotation(Documented.class)This was said to be the right use in anoth

  • Some basic questions from a mac newbie

    hi, i have been using linux and windows all this while, and recently began using an apple too. have some simple questions here that i hope to get some answers for. 1. is there something similar to /etc/hosts in linux where i can add the IP address of

  • Odd problem opening and forwarding .pdf files

    Received several .pdf files. I can open them from the email, but when I save them to my directory, I can't reopen them. When I forward them they can't be opened. When the recipient tries, she gets a message that says "this internet site is not availa

  • Design Plan For IBM WebSphere MQ

    Hi, I am trying to monitor a queue within IBM Websphere MQ using Oracle BAM.The configuration parameters of Enterprise Message Source looks like the following: Type: IBM WebSphere MQ Initial Context Factory: com.sun.jndi.fscontext.RefFSContextFactory