Year to Date Patch Report

Anyone using SCCM 2007 has a software update report that shows total patches installed for period of time?  We are looking for a report that we can show the number of updates deployed by SCCM during a one year period.  Any ideas or help is highly appreciated.

Yes, I know this is an old post, I’m trying to clean them up.
There is no easy way to do this, as a SU might be re-released or expired and therefore the data would be lost. Ultimately my question to you is what are you planning to do with the information?
 Why does it matter? Would it be more important to show how complaint you are?
http://www.enhansoft.com/

Similar Messages

  • Year to Date reports using Prompts

    Hi.
    I'm trying to build a report that will show results of sales compared to Annual targets. All those fields are fields directly at the opportunity level (amount and targets). I also need to put a prompt to select dates from and to, for the Opportunity Close date. I've used Variables for this, and am comparing throuhg two filters "Opportunity.Close Date greater than pvCloseDateFrom" and "Opportunity.Close Date lower than pvCloseDateTo". I'm also presenting the % Achievment, which is the % of Total Sales compared to the Target field.
    So far the report is simple
    User - Total Amount of Sales - Target FIeld - % Realized.
    The difficulty I'm facing concern the next set of columns in the report : I also need to present the Year to Date Target that is represented by the number of days between the two dates prompted (for instance if I prompt 01/01/2010 and 31/03/2010 needs to show 25% of the total target) along with the % of SAles compared to this new target calculated field.
    I'm having issues with the TIMESTAMPDIFF function through the Presentation Variables as it either tells that the type is not correct even if I'm trying to use the CAST function or it discard part of the string when I'm trying to rebuilt the date as a timestamp : in my configuration date are presented D/M/YYYY where my timestamp function expects DDDD-MM-DD HH-MI-SS.
    Is there anyone who could have an example of such calculations in a report based on dates and duration ?
    Thanks in advance for your help !!
    Olivier

    Dear Adam,
    For Year to Date , We have created a Customer Exit , For working , Create a Variable for 0calday and populate that with from and to value ...to value would be Sy-datum and From value is year starting date. Hope it helps..
    Thanks,
    Krish

  • Year to Date and Monthly totals

    I know that this is rather simplistic, but I'm new to Discoverer and need to set up a bunch of sales reports with MTD and YTD columns. I'm going to be using the same SQL query for many of my reports but customizing the reports to show sales by state, product line, etc.
    Is there a formula/function I can use in Discover for the Month to Date and Year to Date totals?
    Thanks,
    Joseph

    Hi Joseph
    You can use the analytic range SUM calculation for these. For the month to date, use the a PARTITION BY of month with a range of all the preceding rows in the partition up to and including the current row. For the year, you would simply change the PARTITION BY to be the year.
    Here are some examples drawn from my own database:
    I have the following items:
    ORDER_YEAR
    ORDER_MONTH
    ORDER_DATE
    SELLING_PRICE
    With these defined, the formula for month to date is:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC ROWS UNBOUNDED PRECEDING)
    The formlua for year to date is:
    SUM(Selling Price SUM) OVER(PARTITION BY ORDER_YEAR  ORDER BY  ORDER_DATE ASC  ROWS  UNBOUNDED PRECEDING )
    Basically what we are doing is telling Discoverer to SUM the SELLING_PRICE, and you should be able to take these and adjust them for your own report.
    Let me take a look at the month to end and describe what is going on. Basically the PARTITION BY is defining a set of rows which are to be included. In this case it is all rows that have the same ORDER_MONTH. The ORDER BY clause tells Discoverer to place the items in order, with the oldest order first. The ROWS UNBOUNDED PRECEDING tells Discoverer to SUM all of the items within the set (within the PARTITION BY) from the oldest item (UNBOUNDED PRECEDING) to and including the current item. We could have added a BETWEEN clause too but that is implied. With a BETWEEN clause it would look like this:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    If you want the current row to be included with UNBOUNDED PRECEDING you don't need to explicitly name it because that is the default. Other options you could use are these:
    UNBOUNDED FOLLOWING - this SUMS to the end of the PARTITION
    ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING - you can guess that this will add all of the items, which you will rarely use because if you omit the ROWS command then this range between first and last is actually the default
    Rather than ROWS BETWEEN you can also say RANGE BETWEEN, like this:
    SUM(Sales.Selling Price SUM) OVER (PARTITION BY ORDER_MONTH ORDER BY ORDER_DATE ASC RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
    I hope this little dissertation on running totals helps.
    Best wishes
    Michael

  • Month to Date and Year to date calculation

    Hello Experts,
    It would be great If you could provide the formula to implement in BO universe or in the Reporting level for the below requirement.
    MTD, LastMonth, Year to Date, Last to LastMonth and examples are below.
    Last Week:
    Eg: Monday through Sunday
    Description: Based on Todayu2019s date, select the Monday of the previous week for the start date and Sunday will be the end date.
    Example:
    If Today is May 22, 2009
    The result would be, Monday = May 11, 2009, Sunday = May 17, 2009
    MTD:
    If Today is May 22, 2009
    I need a result MTD = May 1, 2009 u2013 May 21, 2009
    LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = April 1, 2009 u2013 April 30, 2009
    Last to LastMonth:
    If Today is May 22, 2009
    I need a result LastMaont = March 1, 2009 u2013 March 31, 2009
    Thank you.

    Nisniki,
    Here are the methods using WebI:
    MTD: 
    Create a local variable "MTD Start"
    =RelativeDate(LastDayOfMonth(RelativeDate(CurrentDate();-30));1)
    Create a local variable "MTD End"
    =currentdate()
    LastMonth
    =LastDayOfMonth(RelativeDate(CurrentDate();-30))
    Year to Date
    create a local variable "YTD Begin"
    =ToDate("01/01/"+FormatNumber(Year(CurrentDate());"####");"mm/dd/yyyy")
    (reuse "MTD End" or build a "YTD End" variable same as "MTD End")
    Last to LastMonth
    (similiar to MTD, but using "60" versus "30" to move back two months versus moving back 1 month.
    To perform this stuff in the universe requires an understanding of the SQL syntax for the paricular vendor your are working with.  ANSI SQL agrees to represent and compute dates uniformly, however, the functions to make it happen varies by the vendor.
    Thanks,
    John

  • Month to Date and Year to Date Scenarios

    <b>Dear SAP BI Gurus,
    Can anyone please give me guidance how to create a Month to Date and Year To Date Scenarios (Variables perhaps?) for 0SRR_CF_C1?  The date is in decimal and not DATE format…  I’m assuming the reason for this is to get the Time variance….  Nonetheless, I’d like to create a MTD and YTD scenario for reporting.
    Much Thanks
    Philips Manalaysay</b>

    Hi,
    You should take a look at the blog and doc below.
    /people/vikash.agrawal/blog/2006/10/17/enable-trend-reporting-150-by-manipulating-variable-value
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,

  • Month-to-Date and Year-to-Date values in Query

    Hello experts,
    One of our BI reports has the following requirement: the user should be asked for the report date. After the user inputs the date, the report shows the key figures in three different "flavors": one is the values for that date, the second one is the cumulate values from the first day of the month of the report date to the report date itself, and the third is the cumulate values from the first day of the year of the report date to the report date itself.
      I created my report date variable based on 0CALDAY. Then I searched for SAP-exit variables that would help me achieve this, but could not really find any, except for 0P_ABO10, 0P_ABO11, 0P_ABO12 variables, all of them have as description "Start of Key Date Year". I tried creating a few selections in which the dates taken were defined as a range from each of these variables to the report date variable (for the year-to-date values), but I got the error "Variable 0P_ABO10 could not be substituted". I also got this error for the other two variables. And I could not find any SAP-exit variables like "Start of Key Date Month", in order to do the Month-to-Date part. My next try was to use the field "Key Date" with a variable in it, instead my own report date variable based on 0CALDAY, but it gave me the same errors.
    I searched the forums and found a few threads that looked useful, like
    First and Last day of month and
    1st day of month / 1st day of week variables
    However, they require some ABAP coding, and I do not know where to place the code (actually, I do not know where to work with ABAP code), and I also believe that I would have to do some changes to it.
    Any suggestions?

    Hi Pedro,
    You have to create customer exit in T_Code: CMOD
    1. Create a Z project
    2. Select RSR00001 as enhancement type.
    3. Go into include ZXRSRU01
    4. create a code like
    Here A is your variable based on 0calmonth with type customer exit and B is variable for 0calday.
    Try to write logic for your case taking this as example.
    WHEN 'A'.
        IF I_Step = 2.
          Loop at I_T_VAR_RANGE into L_T_VAR_RANGE where VNAM = 'B'.
            Concatenate L_T_VAR_RANGE-LOW(4) '001' into D1.
            Concatenate L_T_VAR_RANGE-LOW(4) '012' into D2.
            Clear L_S_Range.
            L_S_Range-low = D1.
            L_S_RANGE-high = D2.
            L_S_RANGE-sign = 'I'.
            L_S_RANGE-opt = 'BT'.
            Append L_S_Range to E_T_Range.
          ENDLOOP.
        ENDIF.
    If you want exact code I can help you in that.
    Thanks,
    Kams

  • Return current period based off of current fiscal year and date

    Good Afternoon,
    Is there a way in the webi that I can create a dimension that always reflects the current Fiscal Month based of Fiscal year and date? I have a report that I am trying to show sales for a customer based off the current fiscal month. I would like this report when refreshed to be based off this fiscal month dimension instead of showing each fiscal month or changing it manually. What is the best way to do this?
    I have attached an image that shows current numbers by period (month) and then the YTD Totals. I would like to have my 'Period' column always reflect the current period and the Total column to reflect that months totals based off the period column. So for this period (3), instead of seeing 3 lines for each month I would just see the '3' and the total as $541,310.46, monthly as 412,502.09 and my YTD as 1,080,091.06.
    Any help is always appreciated!
    Thank you,
    Tiffany

    Hi,
    Create a variable
    FlagVar=If([Period]=Max([Period]) In Report;"Show";"Hide")
    And apply block filter of FlagVar=Show
    Are these coming TotalSales  MonthlyGoal YTDSales directly from universe? If they are calculated at report level then you might want to use NoFilter. like =NoFilter([YTDSales])

  • CURRENT YEAR SALES DATE PARAMATER AND PRIOR YEAR SAME DATE RANGE

    I am pulling data from a SQL view dbo.view that has current and historical SOP data by line.  The date paramater is a date range,  uppr date and lower date formulas are in the report.  I need to include prior year SOP data for the same prior year date range in the detail.  I have tried adding the view in twice with no luck, just duplications.  Ultimately I want to supress the detail and only show the totals by customer so it is comparitive.  Thanks for your help.  Jayne

    OK
    lets simplify it
    get a test data source with some simple dates in it.
    get the report logic working.
    it looks like you have the right formula ideas but lets go for
    @upperthisyear
    @upperlastyear
    @lowerthisyear
    @lowerlastyear
    then assuming a date field of {table1.date}
    the record selection would be
    if (@upperthisyeare > {table1.date} and @lowerthisyear < {table1.date}) or (@upperlastyeare > {table1.date} and @lowerlastyear < {table1.date}) then 1 else 0
    I would test this by using it as a formula field with the test data.

  • Using an expression in SSRS to display rolling 12 month and year to date volumes

    I need some help in writing an expression in SSRS. I have a table that contains date columns and rows that contain different types of data groups. (e.g. total number of items received during the month, total dollars for the month, etc.) I want to add two
    new columns to the end of the report that will display a rolling twelve month total for each of the different rows of data. Plus a column that would show year to date totals for the same rows.
    I was thinking I could accomplish this by adding expressions for each row in the new 'rolling twelve month' and 'YTD' columns in my report however, I'm not sure how to structure the expressions to achieve this.
    Here is an example of how my report currently looks. (I added a pipe delimeter in case the formatting changes once this is submitted.)
                             Jan-2014 | Feb-2014 | Mar-2014 | Apr-2014 | Rolling 12 mth | YTD
    Items received     100 | 35 | 45 | 12 | 192 | 192
    Dollars                $50.00 | $25.00 | $120.00 | $15.00 | $210.00 | $210.00
    Any guidance you can provide would be appreciated.
    Thank you  

    This example shows how to get what you need. It'll take modifying your query to add two cased columns onto the end.
    DECLARE @forumTable TABLE (periodYear INT, periodMonth INT, periodMonthName VARCHAR(12), periodDollars MONEY, periodItems INT)
    DECLARE @i INT = 0
    SET NOCOUNT ON
    WHILE @i < 24
    BEGIN
    INSERT INTO @forumTable (periodYear, periodMonth, periodMonthName, periodDollars, periodItems)
    VALUES (YEAR(DATEADD(MONTH,-@i,GETDATE())), Month(DATEADD(MONTH,-@i,GETDATE())), DATENAME(MONTH,DATEADD(MONTH,-@i,GETDATE())), 1000-@i, 100-@i)
    SET @i = @i+1
    END
    SET NOCOUNT OFF
    SELECT *,
    CASE WHEN CONVERT(VARCHAR,periodYear) + '-' + CONVERT(VARCHAR,periodMonth) + '-01' > DATEADD(MONTH,-12,GETDATE()) THEN periodItems ELSE 0 END AS ytdItems,
    CASE WHEN CONVERT(VARCHAR,periodYear) + '-' + CONVERT(VARCHAR,periodMonth) + '-01' > DATEADD(MONTH,-12,GETDATE()) THEN periodDollars ELSE 0 END AS ytdDollars
    FROM @forumTable

  • Current month and previous months of fiscal year period data

    Hi All,
    My requirement is end user will enter month ie (fiscal year period ) and in report my requiremnt is to show data in two columns 1.Current month data  and
    2.April till date.
    Please let me know how to do this and please send the coding to be done in CMOS.
    Regards

    Hi,
    In your query, you should have following object :
    in filters:
    fiscal period object, with an user entry variable on it (UE_MONTH)
    in rows/ratios:
    Current month column, with your KF and a restriction on 0calmonth2 with an customer exit variable on it (ie: CE_VAR1)
    same for April column. (CE_VAR2)
    in your customer exit, CMOD, step 2, add these two cases :
    WHEN 'CE_VAR1'.
    READ TABLE i_t_var_range WITH KEY vnam = 'UE_MONTH' INTO
                       intern_range.
    CONCATENATE intern_range-low(6) sy-datum+4(2) INTO l_s_range-low.
    l_s_range-sign   = 'I'.
    l_s_range-opt    = 'EQ'.
    APPEND l_s_range TO e_t_range.
    Same for April, add a new case and just replace sy-datum+4(2) by '04'.
    Hope it helps,

  • Calculation of ''Total to Date'' like ''Year to date''

    Hello together,
    How would you calculate a Total to Date in Oracle BI.
    It should sum all values like Year to date up to a certain period inclusive all previous years.
    Example:
    Year Value
    2008 10
    2009 20
    2010 40
    If I select 2009 it shoul display 30. without the previous and the following row.
    Regards,
    Stefan
    Content Level Fiscal Period TOTAL (Do I have to calculate on a yearly level all the past years, - ago - 1, ago -2, ago - 3, ago - 4 up to - 20?)
    minus Year Value
    plus YTD
    Month and Total have to bes diplayed in on line.
    works for the current year but not when you back to last year.
    Edited by: stefanhess on Jun 14, 2010 1:54 PM

    an odd solution.
    In the physical layer you can duplicate the fact table and can join the time dim and duplicated fact with the complex join using the year column with the condition as
    time_dimension.year_column >= fact_table.year_column
    in your report when you bring the year and this measure you will get what you want.
    Edited by: kart on Jun 14, 2010 6:46 PM

  • Customer due date analaysis report

    Hi
    In customer due date analysis report S_ALR_87012068 figures are different from customer local currency report.  In vendors due date analysis report figures matches with vendor local currency figures. But some different amount is showing in customer due date analysis report why it so? FBL5n also showing some different amount
    Can anybody help me.
    Thanks
    jaya

    Hi
    Thanks for your reply, no entry was posted in future date. Any option is there to check carry forward fiscal year run has been done or not. Because i have checked for this year 2008 i don't know about 2007 is done or not
    Can u help me
    thanks
    jaya

  • Vendor payments made year to date

    Hi Friends,
    I have to show the report to client which can give year to date payments made to all individual vendors.
    I have around 3000 vendors and I need to pull report for all of them
    Can you please tell me if there is any standadrd SAP report or settings that can provide me with these details?
    It doesnt need to be line item vise FBL1N is not useful.
    Please let me know
    Thanks

    Hi,
    Normally payments are booked via document type "KZ".
    You can execute thru fbl1n, and in the multiple selection choose Doc Type "KZ" and select all items till date.
    You can then as per your wish can create the sorting and subtotals.
    Also you can download in excel and do the further processing.
    There is one more suggestion:  You can create query on table BSAK in which all cleared vendor line items are stored.
    Hope this will help, if yes, please assign points.
    Regards,
    Harish

  • Help With Date driven report

    I am trying to generate a list of the programs on all channels for a specific day showing the channel number, supplier, package, program name, rating code, and show time. This will be similar to a program guide, only not package specific. This is a date-driven report, therefore it should only display programs for a single date specified.
    [code/]SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGDESCRIPT AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE S.PROGTIME='18-DEC-10'
    ORDER BY C.CHNUM
    Which gives me an undesired resulT containg rows that put names of all channels with each channel number and ends up outputting 3016 rows which there should be only 29.
    I don't know how to add my script file here since there is no option for an attachment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Ok here is my syntax I have been working on
    SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGCODE AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE C.CHID=S.CHID
    ORDER BY C.CHNUM;
    Here are the tables and data
    CREATE TABLE CHANNEL_TYPES(
    CHANTYPEID CHAR(10) NOT NULL,
    CHANTYPEDESC VARCHAR2(15) NOT NULL,
    PRIMARY KEY(CHANTYPEID));
    CREATE TABLE SUPPLIERS(
    SUPID NUMBER(4) NOT NULL,
    SUPNAME CHAR(4) NOT NULL,
    SUPSTADD VARCHAR2(30) NOT NULL,
    SUPCITY VARCHAR2(30),
    SUPSTATE CHAR(2),
    SUPZIP NUMBER(9),
    CONTNAME VARCHAR2(30) NOT NULL,
    CONTPHNUM VARCHAR2(15),
    CONTEMAIL CHAR(50),
    PRIMARY KEY(SUPID));
    CREATE TABLE RATING(
    RATINGID NUMBER(4),
    RATINGDESCRIPT VARCHAR(30),
    RATINGCODE VARCHAR(10),
    PRIMARY KEY(RATINGID));
    CREATE TABLE PACKAGE(
    PKGID NUMBER(6) NOT NULL,
    PKGDESC VARCHAR2(40) NOT NULL,
    PKGNAME VARCHAR2(15),
    PKGPRICE NUMBER (8,2),
    PRIMARY KEY(PKGID));
    CREATE TABLE CHANNELS(
    CHID NUMBER(5) NOT NULL,
    CHNUM NUMBER(3) NOT NULL,
    CHNAME VARCHAR2(20) NOT NULL,
    CHANTYPEID CHAR(10) NOT NULL,
    PRIMARY KEY(CHID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID));
    CREATE TABLE PROGRAM(
    SUPID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR2(20),
    PROGDESC VARCHAR2(30) NOT NULL,
    PROGLGTH NUMBER(4),
    CHANTYPEID CHAR(10),
    RATINGID NUMBER(4),
    PRIMARY KEY(PROGNAME),
    FOREIGN KEY(SUPID) REFERENCES SUPPLIERS(SUPID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID),
    FOREIGN KEY(RATINGID) REFERENCES RATING(RATINGID));
    CREATE TABLE SCHEDULE(
    SCHEDID CHAR(6) NOT NULL,
    CHID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR(20) NOT NULL,
    PROGTIME DATE NOT NULL,
    PRIMARY KEY(SCHEDID),
    FOREIGN KEY(PROGNAME) REFERENCES PROGRAM(PROGNAME));
    CREATE TABLE CHANNEL_PACKAGE(
    CHID NUMBER(5) NOT NULL,
    PKGID NUMBER(6) NOT NULL,
    FOREIGN KEY(CHID) REFERENCES CHANNELS(CHID),
    FOREIGN KEY(PKGID) REFERENCES PACKAGE(PKGID));
    --INSERT STATEMENTS
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 4578, 'NBC', '10880 WILSHIRE BLVD #1200', 'LOS ANGELES','CA','90213','JEFF KING','310-369-5231','[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 5267, 'ABC', '26547 STARS BLVD #5699', 'LOS ANGELES','CA', '90212', 'JACK CAVERISI', '310-840-9966', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 7137, 'FOX', '10960 WILSHIRE BLVD', 'LOS ANGELES','CA', '90213', 'JANIS CARMIKEL', '310-235-5233', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 3549, 'WB', '3701 W. OAK ST', 'BURBANK', 'CA','91125', 'SIMON PHILIPS', '310-532-6588', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 6389, 'STAR', '3291 GOLDEN LN.', 'BURBANK', 'CA', '91124', 'SOPHIA SLERPY', '310-677-9511', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5729, 'CNN', '579 WALNUT ST. #7893', 'LOS ANGELES', 'CA', '90215', 'MILDRED FOLLEY', '310-729-5568', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5376, 'CBS', '3499 SURVIVOR CR.', 'BURBANK', 'CA', '91125', 'SHANNON MYERS', '310-648-1064', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7763, 'TBS', '95 TURNER BLVD.', 'ATLANTA', 'GA', '26478', 'ALEXIS COUPE', '443-752-7335', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (3675, 'LIFE', '9945 SAILOR LN.', 'NEW YORK', 'NY', '36984', 'KRISTIAN HART', '646-985-8998', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (2599, 'CW', '55890 TERRANCE DR', 'NEW YORK', 'NY', '36983', 'NANCY BOTWIND', '646-736-7349', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (8771, 'MTV', '7721 TIMES SQ. #98654', 'NEW YORK', 'NY', '36983', 'KID ROCK', '646-992-1257', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7700, 'G4', '87264 GEEK LN.', 'NEW YORK', 'NY', '36983', 'OLIVIA MUNN', '646-753-7312', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (6666, 'FEAR', '666 ELM ST.', 'SLEEPY HOLLOW', 'NY', '36907', 'FREDDY KRUGER', '646-568-9666', '[email protected]');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0001, 'GENERAL AUDIENCE', 'G');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0002, 'PARENTAL GUIDENCE', 'PG');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0003, 'PARENTAL GUIDENCE 13', 'PG13');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0004, 'RATED', 'R');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0005, 'NO ONE 17 AND UNDER ADMITTED', 'NC17');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0006, 'MATURE', 'M');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0007, 'NUDITY', 'N');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0008, 'LANGUAGE', 'L');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0009, 'MILD VIOLENCE', 'MV');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0010, 'VIOLENCE', 'V');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0011, 'SEXUAL CONTENT', 'SC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('M', 'Movie');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('N', 'News');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('L', 'Lifestyle');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('D', 'Documentary');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('S', 'Sports');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('R', 'REALITY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('C', 'CHILDREN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('F', 'FAMILY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('H', 'HORROR');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('I', 'INSTRUCTIONAL');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MU','MUSIC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MYST', 'MYSTERY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('NA', 'NATURE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('RE', 'RELIGOUS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('ROM', 'ROMANCE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SCIFI', 'SCIENCE FICTION');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SO', 'SOAP OPERAS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('TS', 'TALK SHOW');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('W', 'WESTERN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('AD', 'ADULT');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('BIO', 'BIOGRAPHY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('CART', 'CARTOONS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SHOP', 'SHOPPING');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1001, 1, 'Movie Channel 1', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1002, 2, 'StarZ', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1003, 3, 'FOX News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1004, 4, 'Real News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1005, 5, 'Lyfetiem', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1006, 6, 'FIT TV', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1007, 7, 'Gumshoe', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1008, 8, 'Reality Everything', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1009, 9, 'Pure Gridiron', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1010, 10, 'NESN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1011, 11, 'GAMESHOW NETWORK', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES ( 1012, 12, 'HSN', 'SHOP');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1013, 13, 'CARTOON NETWORK', 'CART');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1014, 14, 'ONE LIFE', 'BIO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1015, 15, 'MY MUSIC', 'MU');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1016, 16, 'HEAVENLY TV', 'RE');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1017, 17, 'GUNSLINGER', 'W');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1018, 18, '24-7 TALK SHOWS', 'TS');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1019, 19, 'SOAPNET', 'SO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1020, 20, 'WBFF20', 'MYST');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1021, 21, 'ABC FAMILY', 'F');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1022, 22, 'LOVETV', 'ROM');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1023, 23, 'SYFY', 'SCIFI');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1024, 24, 'OUTDOORS', 'NA');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1025, 25, 'DIY', 'I');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1026, 26, 'CHILLER', 'H');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1027, 27, 'REALTV', 'R');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1028, 28, 'ESPN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1029, 29, '5STAR', 'M');
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(4578, 'N', 'NBC Tonight', 'News from around the world', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(7137, 'L', 'Sale of the Year', 'Game Show Lifestyle', 24, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(3549, 'M', 'Fly Killers are Back', 'Flies attack the city once', 175, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (5267, 'N', 'FOX ACTION NEWS', 'LOCAL NEWS', 60, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6389, 'M', 'MR. NICE GUY', 'MR.NICE GUY SAVES THE DAY', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'L', 'COOKING WITH FOOD', 'PREPARING A HOLIDAY FEAST', 180, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'STEELERS VS RAVENS', 'FOOTBALL', 240, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5376, 'S', 'US OPEN', 'CHAMPIONSHIP TENNIS', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7700, 'D', 'HISTORY VIDEO GAMES', 'THEN AND NOW', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'D', 'A WORLD AT WAR', 'WWII DOCUMENTARY', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'L', 'WHEEL O TERROR', 'GAMESHOW', 60, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'SHOP', 'DEAL OF THE CENTURY', 'SHOPPING', 240, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'C', 'SCOOBY DOO', 'SCOOBY AND GANG', 60, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'BIO', 'MS13 GANG', 'INSIDE THE MS13 GANG', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'MU', '#1 VIDEOS', 'TODAYS HOTTEST VIDEOS', 300, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'RE', 'SCRIPTURE READING', 'REV.DEAK READS ',120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (7700, 'W', 'GUNSLINGER', 'SHOOTOUT IN THE OLD WEST', 60, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'TS', 'JERRY SPRINGER', 'RELATIONSHIP BREAKUPS', 60, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 4578, 'SO', 'GENERAL HOSPITAL', 'SOAP OPERA', 120, 0006);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7137, 'MYST', '48 HOURS', 'WHO KILLED JIMMY HOFFA', 60, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'F', 'FULL HOUSE REUNION', 'STARS FROM FULL HOUSE REUNITE', 120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'ROM', 'CUPIDS ARROW', 'LOVERS IN LOVE', 30, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'SCIFI', 'WAREHOUSE 13', 'NONE AVAILIBLE', 60, 0005);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'NA', 'DEER HUNTER EXTREME', 'HUNTING', 120, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'I', 'FIXING THE SINK', 'HOW TO FIX LEAKY SINK', 60, 0008);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6666, 'H', 'SAW XX', 'RELENTLESS PSYCO KILLS AGAIN', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'AD', 'VICTORA FASHION SHOW', 'MODELS', 60, 0007);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'UFC 300', 'PRO MMA', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'M', 'NOT HOME ALONE', 'NONE AVAILABLE', 120, 0002);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1005, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 4);
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1101', 1001, 'NBC Tonight',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES (1102, 1002, 'Sale of the Year',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1103', 1003, 'Fly Killers are Back',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1104', 1004, 'FOX ACTION NEWS',TO_DATE('18-DEC-10 18:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1105', 1005, 'MR. NICE GUY',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1106', 1006, 'COOKING WITH FOOD',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1107', 1007, 'STEELERS VS RAVENS',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES('1108', 1008, 'US OPEN',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1109', 1009, 'HISTORY VIDEO GAMES',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1110', 1010, 'A WORLD AT WAR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1111', 1011, 'WHEEL O TERROR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1112', 1012, 'DEAL OF THE CENTURY',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1113', 1013, 'SCOOBY DOO',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1114', 1014, 'MS13 GANG',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1115', 1015, '#1 VIDEOS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1116', 1016, 'SCRIPTURE READING',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1117', 1017, 'GUNSLINGER',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1118', 1018, 'JERRY SPRINGER',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1119', 1019, 'GENERAL HOSPITAL',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1120', 1020, '48 HOURS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1121', 1021, 'FULL HOUSE REUNION',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1122', 1022, 'CUPIDS ARROW',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1123', 1023, 'WAREHOUSE 13',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1124', 1024, 'DEER HUNTER EXTREME',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1125', 1025, 'FIXING THE SINK',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1126', 1026, 'SAW XX',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1127', 1027, 'VICTORA FASHION SHOW',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1128', 1028, 'UFC 300',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1129', 1029, 'NOT HOME ALONE',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));

  • Need to show Previous months data in report

    Hi All,
    I have a crystal report 2011 which shows monthly Cash data. It has 3 other columns like Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data in report.
    My report also has two parameters- start date and end date. If I give Start date as 1/1/2012 and end date as 12/31/2013 (two years date range) then correct data comes in all columns and for 2013 year, correct data is coming for Previous 12 months column. But if I give only one month date range like start date as 1/1/2013 and end date as 01/31/2013, then it is not showing correct data for these 3 columns - Previous 3 months cash data, previous 6 months cash data, Previous 12 months cash data. Ideally as per requirement, it should calculate previous months data regardless of parameter values and put data in respective columns.
    Any help/suggestion? Any trick which can help me to show correct data in all columns no matter what date range or months I am taking in parameters.
    Is it mandatory to have previous 12 Months data in report to calculate column-Previous 12 months Cash data?
    Thanks,
    Remi

    Hi Remi,
    You can try like this:
    I have given a some suggestions i.e You just take one parameter only because u can imagine 3 columns previous data display correctly i.e From Date
    Month parameter is also a alternate option.
    For Ex: Column1: From Date - 90 Days/3 Months  - we get the three months previous data correctly etc.
    Finally, create a stored procedure that returns the required columns and does all the calculations on the database side.
    Follow abhilash suggestion as well.
    Useful threads: Crystal Report Parameter Issue
    Pull Last 6 months of data
    Month to date data for Previous month
    How to find current month, previous month Net Sales by means of formula?
    Thanks,
    DJ

Maybe you are looking for