-1 current week and the last 9 weeks

Hello

I want to show the tax in the x-axis as weeks

(current_week) - last 9 weeks only


Thank you

Published by: 806756 on February 6, 2013 22:21

Hello

try to combine these two:

TIMESTAMPADD (SQL_TSI_WEEK,-4, (TIMESTAMPADD (SQL_TSI_WEEK-1, CURRENT_DATE)))

Tags: Business Intelligence

Similar Questions

  • Date of the first and the last of the week

    I have a date that is


    dates week_no
    ---------------- -----------------
    1 JULY 09 ' 26


    I want to take the first and the last date of the week in which my date (1 July 09 ') exists, this means
    I want to catch the first date of the 26th week and the last date of the 26th week.

    Not sure what is your first day of the week, but in any case, you can change

    SQL> select dt, trunc(dt,'iw') monday, trunc(dt,'iw') + 6 sunday from (
      select date '2009-07-01' dt from dual
    )
    /
    DT         MONDAY     SUNDAY
    ---------- ---------- ----------
    01.07 2009 29.06 2009 05.07 2009
    
  • Hide the first and the last Division in the WPF chart axis

    I want to hide the default marker of the first and the last major division in an axis of a chart of WPF. I tried to extend RangeDivisionsMode and define my own class object to the MajorDivisions.Mode property on the axis. But even when I returns a list empty in RangeDivisionsMode.GetDivisions(...), the first and the last marker is drawn.

    Thanks in advance, Jonas

    The minimum and maximum labels are transmitted separately when displaying a scale (even if technical RangeDivisionsMode custom can be used for the minor divisions).

    There is no direct configuration option to hide extreme labels, but you can achieve this effect by initializing the LabelPresenter property on MajorDivisions by a custom implementation:

    class CustomFormatter : GeneralValueFormatter {

            protected override UIElement VisualizeCore( TData value, ValuePresenterArgs args, UIElement existingVisual ) {

                UIElement element = base.VisualizeCore( value, args, existingVisual );

    var axis = (Axis)args.Context;

                Range range = axis.Range;

                var comparer = range.Comparer;

                bool isExtreme =

                       comparer.Compare( range.Minimum, value ) == 0

                    || comparer.Compare( range.Maximum, value ) == 0;

                element.Opacity = isExtreme ? 0.0 : 1.0;

    return element;

            }

        }

  • I have install fallout 3 and the last update (1.7), but when starting a new game, he tell me that windows is having a problem reading it & then it locksup.

    original title: game Fallout 3 on Windows 7 problem

    I have install fallout 3 and the last update (1.7), but when starting a new game, he tell me that windows is having a problem reading it & then it locksup, I have a Toshiba Satellite, Fallout New Vegas works perfectly on my laptop, how can I play Fallout 3, is here to play Fallout 3 on windows 7.

    Hello

    You can see the link provided. It gives information that Fallout 3 is not compatible with Windows 7.

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?l=en-us&type=software&s=fallout%203%20

    Windows 7 Compatibility Center: Fallout 3 http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?l=en-us&type=software&s=%20Fallout%203&OS=32-bit

    You may need to contact the manufacturer of game for support

  • My computer is dead, had to get the new computer. Installed PS CS2 and tried to activate it. Cannot call the online help desk, they sent me to you to activate my software. I have the serial number and the last activation number. T

    My computer is dead, had to get the new computer. Installed PS CS2 and tried to activate it. Cannot call the online help desk, they sent me to you to activate my software. I have the serial number and the last activation number. Thank you. Or to intervene in the forum.



    [address removed by email.. mod]


    Hi carlkent,

    Your serial for Photoshop CS2 key would not work as the activation for CS2 servers were closed.

    You must visit this link to download the version CS2 and use the key to series mentioned in this link: https://helpx.adobe.com/creative-suite/kb/cs2-product-downloads.html

  • How to recover/find only the FIRST and the LAST members in a Dimension using Maxl

    Hi all

    I have a requirement where in I need to retrieve only the FIRST and the LAST members of the Dimension of the year.

    For example my year round Sun having EF07, AFA 08 FY09, FY10 as members so I need to get the first (EF07) & the last members (FY10) using maxl.

    Is it possible in Essbase Maxl accehieving meanings.

    I have a custom cdf to find members of the first and the last, if you are interested.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • It is possible to select more than one layer by selecting the first and the last layers?

    I frequently get Illustrator files which are individual objects such as the paths on separate layers that can be grouped together to make the shorter layers. I find that I have to change click on each individual layer to select it to finally bring together them. Sometimes, I have 25 or so layers that I need to select. Is there a way to select the first and the last layer in the layers palette and have Illustrator select all the layers in the meantime?

    Don't know about the selection of layers of first/last, but to select several consecutive layers in the layers palette...

    Option-click on (Mac) on a layer to select it and, with the option always pressed key, drag to the bottom of the list - DO NOT slip on as logical target icons you like.  When you drag to the bottom of the list of layers, the icons of the target will become selected.

    Shift + Option-click allows you to ignore the layers and continue to select consecutive additional layers on the bottom of the palette.

    Note: Drag slowly or some layers would not choose.

    Strange, I know.  It took me years to come across this.

  • Grep - between the first and the last tab

    My data is in the following format:

    Sku. . . . . . . . Description.... $xxx.xx ea.

    I have a paragraph style that puts in the tab stops and makes the text bold.  I need "BOLD" to apply only to the reference and the price.  I need items description and leader to be regular.

    If I put a grep style to apply a style to regular characters to tabs, it almost works.  Leader points are regular, but the description still in bold.

    How can I set up a grep style to find between the legs of the first and the last, all the up to the first tab and also after the last tab?

    Notes:

    The Sku can be of variable length and can include alpha and numeric characters.

    The price may or may not begin with the character $, may or may not have shown cents, may or may not be followed by text for the unit of measure (i.e. ea = each, PR. pair =, etc., or can be empty)

    \t.+\t is everything between the legs of the first and the last.

    Peter

  • ORA-01847: day of the month must be between 1 and the last day of the month

    Hi all






    Select
    To_date(mDate||) e '|| mtime, "YYYY-MM-DD HH24MISS") meddate
    of PR_MOCTEST_TEMP

    mDate IS OF TYPE of DATA VARCHAR2 AND mtime OF VARCHAR2

    mDate: 07-09-2009
    mtime: 131241

    mDate IS IN FORMAT DD-MONTH-YYYY
    mtime: HHMMS

    mtimeOF IS OF TYPE of DATA VARCHAR2 AND VARCHAR2 mDate

    mDate: 07-09-2009
    mTIME: 131241

    mDATE IS IN FORMAT DD-MONTH-YYYY
    mTIME: HHMMS

    I NEED TO COMBINE THE 2 COLUMNS TO GET THE OUTPUT AS DD-MM-YYYY HH24MISS
    AND I AM GETTING THE ERROR;


    ORA-01847: day of the month must be between 1 and the last day of the month

    where mistaken?

    Please notify


    Kai

    You will find the bad dates using a table of logging of errors:

    --we'll try to insert into here, invalid dates will be thrown out
    create table dst(d date);
    
    -- create an error log table dst_err
    exec dbms_errlog.create_error_log('dst', 'dst_err');
    
    -- try the insert. Will fail with your ORA-01847
    insert into dst select TO_DATE(mdate||' '||mtime,'DD-MM-YYYY HH24MISS') from PR_MOCTEST_TEMP log errors into dst_err('comment'); 
    
    -- view the errors
    select * from dst_err;
    
  • How can I get a report containing data on the current month and the next month

    How can I get next month?
    I want a report that include data on the current month and next month.

    My solution is "Closing Date". "" Fiscal month "> = Valueof (NQ_SESSION. CURRENT_MONTH)
    S 'closing Date '. "" Fiscal month "< = MONTH (CURRENT_DATE + 30)

    But this show only the information between the current month and the date of the day + 30 days

    Does anyone have a better solution?

    You can meet the next email [email protected].

    Greetings!

    GON,

    Add the near field date in your report, add a filter and choose between. Place the cursor in the first box and select Add - SQL expression, paste into the first expression that I gave you. Repeat for the 2nd box and voila it will filter you need. If you are unsure, then use the superior / equal to the value for the first term and the lower than the 2nd.

    see you soon
    Alex

  • How can I get the name of the current page and the number?

    Hello world!

    Anyone know how to get the name of the current page and the number? What variable I should he request?

    Thanks in advance!

    The question of the application defined by the system: APP_PAGE_ID is the page number. For the name of the page, you will need to query the view of Apex with something like this:

    Select PAGE_NAME
    of APEX_APPLICATION_PAGES
    where PAGE_ID =: APP_PAGE_ID

    Good luck

    Stew

    PS Feel free to mark this reply as being correct, so it is.

  • If I Upgrade to windows 10 will be my background stay screen with the current image and the current files?

    I have Windows 7 Home Premium now and don't want to not lose my word as AbiWord documents and don't want to lose my photos that I've currently saved on my computer and also do want to not lose the image background current I and also use ITunes 9 for my music and don't want any version of ITunes later than Version 9. If the upgrade to Windows 10 I will all the same stay without disappearing?

    Hey SalBlandino,

    The upgrade to Windows 7 or later will preserve my personal files, applications, and settings?

    Yes, the upgrade to Windows 7 or a later version will preserve your personal files (documents, music, pictures, videos, downloads, Favorites, contacts, etc., applications (IE.) Microsoft Office, Adobe applications etc), games and settings (ie. passwords, dictionary, the application settings).

    No software should be removed from your computer when you upgrade to Windows 10.

    However, it is advisable to back up your data before upgrading.

    Do not answer to any question. Kindly mark as an answer if I solve any query

  • Filling of updated by and the last Date of update in Wizard generated shape tab

    Version 4.2.6.00.03

    Hello

    I have a wizard generated shape tab and I have to fill two columns last updated by and last Date of update.

    I have a horrible time to do something which should be easy enough.

    I created a page process:

    BEGIN

    BECAUSE me in 1... APEX_APPLICATION.g_f01. COUNTY

    LOOP

    UPDATE high_level_estimate

    SET last_updated_date = SYSDATE

    , last_updated_by =: APP_USER

    WHERE high_level_estimate_id = APEX_APPLICATION.g_f03 (i);

    END LOOP;

    END;

    But the columns are not updated.

    The primary key column and the primary key column appears in do not appear that's why I think the columns are not updated.

    So when a new row is added or an existing row is updated when the user clicks on the button submit these two columns need to be updated.

    Can someone help me get this to work?

    Can what information I provide?

    Thank you

    Joe

    Jen,

    Wow! Thanks for checking back!

    I had finally it works. Sorry I didn't update the post.

    I used the trigger approach, although I do not like but it is.

    What I did try to find out which of these two areas were the origin of the problem. So said the two fields in the query and ran the page and update the page and there is no error of course since I commented on the columns.

    Then I've uncommented a column, repeated updates, and worked, and this column has been updated.

    I uncommented the other column, repeated that updates and work again and again update the two columns.

    I have NO IDEA why. Somehow something has been corrupted, and comment and uncomment the columns set.

    I have no change to relax during this process. The relaxation I posted earlier is the same code.

    Thank you very much for your help Jen!

    Thank you

    Joe

  • How to complete the data for months current quarter of the last month of the previous quarter

    • Here is the create table and insert the statement how my data is as
      CREATE TABLE SAMPLEDATA (Snapshot_M DATE, Date_Ky DATE, F_Quantities INTEGER)
      INSERT INTO VALUES SAMPLEDATA (SEPTEMBER 1, 2014 ", 1 SEPTEMBER 2014", 14)
      INSERT INTO VALUES SAMPLEDATA (OCTOBER 1, 2014 ", 1 OCTOBER 2014", 13)
      INSERT INTO VALUES SAMPLEDATA (1 NOVEMBER 2014", 1 NOVEMBER 2013', 12)
      INSERT INTO VALUES SAMPLEDATA (DECEMBER 1, 2014", 1 DECEMBER 2013', 11)
      INSERT INTO VALUES SAMPLEDATA (JANUARY 1, 2014 ", 1 JANUARY 2014", 10)
      INSERT INTO VALUES SAMPLEDATA (FEBRUARY 1, 2014 ", 1 FEBRUARY 2014", 90)
      INSERT INTO VALUES SAMPLEDATA (MARCH 1, 2014 ", 1 MARCH 2014", 20)
      INSERT INTO VALUES SAMPLEDATA (APRIL 1, 2014 ", 1 APRIL 2014", 23)
      INSERT INTO VALUES SAMPLEDATA (MAY 1, 2014", 1 MAY 2014', 30)
      INSERT INTO VALUES SAMPLEDATA (JUNE 1, 2014 ", 1 JUNE 2014", 70)
      INSERT INTO VALUES SAMPLEDATA (JULY 1, 2014 ", 1 JULY 2014", 20)
      Desired results set:
      Snapshot_M Date_Ky F_Quantities
      10 1/1/2014-2/1/2014
      10 1/1/2014-3/1/2014
      01/01/2014 41 10/2014
      4/1/2014 5/1/2014 23
      4/1/2014 6/1/2014 23
      4/1/2014 7/1/2014 23

      My requirement is to load the data in the cube.

      So to summarize, data that are loaded onto the month last only a quarter Q1 tax (Jan) should server as a data for the quarter Q2 next month (February, March, April), the data loaded on the last month of Q2 (Apr) will be server as forecast data for Q3 months and so on.

      Thank you in advance.



    with

    SAMPLEDATA as

    (select to_date('09/1/2014','mm/dd/yyyy') snapshot_m, to_date('09/01/2014','mm/dd/yyyy') date_ky, 14 f_quantities of all the double union)

    Select to_date (October 1, 2014 "," mm/dd/yyyy ""), to_date (1 October 2014 "," mm/dd/yyyy"), 13 union double all the

    Select to_date (November 1, 2013 "," mm/dd/yyyy ""), to_date (1 November 2013 "," mm/dd/yyyy"), 12 union double all the

    Select to_date (December 1, 2013 "," mm/dd/yyyy ""), to_date (1 December 2013 "," mm/dd/yyyy"), 11 union double all the

    Select to_date (January 1, 2014 "," mm/dd/yyyy ""), to_date (1 January 2014 "," mm/dd/yyyy"), 10 of all the double union

    Select to_date (February 1, 2014 "," mm/dd/yyyy ""), to_date (1st February 2014 "," mm/dd/yyyy"), 90 union double all the

    Select to_date (March 1, 2014 "," mm/dd/yyyy ""), to_date (1 March 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (April 1, 2014 "," mm/dd/yyyy ""), to_date (1 April 2014 "," mm/dd/yyyy"), 23 union double all the

    Select to_date (May 1, 2014 "," mm/dd/yyyy ""), to_date (1 may 2014 "," mm/dd/yyyy"), 30 union double all the

    Select to_date (June 1, 2014 "," mm/dd/yyyy ""), to_date (1 June 2014 "," mm/dd/yyyy"), 70 union double all the

    Select to_date (July 1, 2014 "," mm/dd/yyyy ""), to_date (1 July 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (August 1, 2014 "," mm/dd/yyyy ""), to_date (1 August 2014 "," mm/dd/yyyy"), 22 of the double

    )

    Select snapshot_m, date_ky, last_value (f_quantities) ignore nulls on f_quantities (order by date_ky)

    of (trunc (add_months (snapshot_m-1), 'q') select snapshot_m, date_ky,)

    -case when trunc (add_months (snapshot_m-1), 'q')! = lag (trunc (add_months(snapshot_m,-1), 'q')) (date_ky order)

    then lag (f_quantities) (date_ky order)

    end f_quantities

    of sampledata

    where date_ky > = date ' 2014-01-01'

    )

    where snapshot_m > = date ' 2014-01-01'

    order of date_ky

    SNAPSHOT_M DATE_KY F_QUANTITIES
    01/01/2014 01/02/2014 10
    01/01/2014 01/03/2014 10
    01/01/2014 01/04/2014 10
    01/04/2014 01/05/2014 23
    01/04/2014 01/06/2014 23
    01/04/2014 01/07/2014 23
    01/07/2014 01/08/2014 20
    01/07/2014 01/09/2014 20
    01/07/2014 01/10/2014 20

    Concerning

    Etbin

  • Select records of first and the last in the Group results - Oracle 11 g

    I have the following information in the Oracle 11 g table:

    Qty.Production orderDate and time
    200000000000000000112 JANUARY 14 00:02
    200000000000000000112 JANUARY 14 00:05
    200000000000000000112 JANUARY 14 00:07
    2000000000000000001JANUARY 13, 14 00:09
    300000000000000000212 JANUARY 14 00:11
    3000000000000000002JANUARY 12/14 00:15
    300000000000000000212 JANUARY 14 00:20
    300000000000000000214 JANUARY 14 00:29

    I here to write a query that returns the following:

    Qty.Production orderFirstLast
    800000000000000000112 JANUARY 14 00:02JANUARY 13, 14 00:09
    1200000000000000000212 JANUARY 14 00:1114 JANUARY 14 00:29

    Is the sum of the Qty. grouping column by Production order and the time of the first and last records for each Production order .

    I came up with a query that gave this result:

    Qty.Production orderFirstLast
    800000000000000000112 JANUARY 14 00:0214 JANUARY 14 00:29
    1200000000000000000212 JANUARY 14 00:0214 JANUARY 14 00:29

    Wwhich means that the and last columns show the first and last date / time the whole table. Please note that there is a shadow table. Sorry, I am now allowed to write the actual query

    , I came with given work policies don't allow me to share. Also, I tried with windowing functions such as rank()and row_number() but my user has not enough privileges to do so.

    Help or advice will be greatly appreciated.

    Due to the fact that Oracle does not have the lines in a particular order, it would be wrong that the first 'date' would be the first line to be processed by the query.

    So, you will need to provide another column if you do not want to look at the table as ordered by date.

    Any analytic function must also allows you to provide the 'to' and if that's the date, then just a simple query:

    SQL > WITH Tab1 (quantity, Production_Order, patch)

    2 ALSO (SELECT 20, '00000000000000001', TO_DATE (12 JANUARY 14 00:02 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL)

    20. SELECT 3, '00000000000000001', TO_DATE (12 JANUARY 14 00:05 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL

    4. SELECT 20, '00000000000000001', TO_DATE (12 JANUARY 14 00:07 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL

    20. SELECT 5, '00000000000000001', TO_DATE (13 JANUARY 14 00:09 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL

    6. SELECT 30, '00000000000000002', TO_DATE (12 JANUARY 14 00:11 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL

    30 SELECT 7, '00000000000000002', TO_DATE (12 JANUARY 14 00:15 ', 'HH24 LUN-JJ-AA') OF ANY UNION DOUBLE

    8. SELECT 30, '00000000000000002', TO_DATE (12 JANUARY 14 00:20 ', 'DD-MON-YY HH24') FROM DUAL UNION ALL

    9 SELECT 30, '00000000000000002', TO_DATE (14 JANUARY 14 00:29 ', 'DD-MON-YY HH24') FROM DUAL)

    10. SELECT SUM (Qty), Production_Order, MIN (update), MAX (updated)

    11 OF Tab1

    GROUP of 12 BY Production_Order

    13 * ORDER BY Production_Order

    SQL > /.

    SUM (QTY) PRODUCTION_ORDER (PDATE) MIN MAX (PDATE)

    ---------- -------------------- ----------------------------- -----------------------------

    80 00000000000000001 12 January 2014 00:02:00 January 13, 2014 00:09:00

    120 00000000000000002 12 January 2014 00:11:00 January 14, 2014 00:29:00

  • With the help of SQL, need to display the previous year, current year and the year next to single variable

    Hi all

    We have an obligation to state the previous year, current year and values of the year next as a LOV in the ADF page.

    This is the query that retrieves the previous year, current year and next year. But the result of this query displays values in 3 columns:

    Select (Extract(year from sysdate)-1), extract (year sysdate), (extract (year sysdate) + 1) twice;

    Output:

    2012 2013 2014


    But I want to display them in a single with 3 rows as column:

    2012

    2013

    2014


    Please your ideas.

    or in the same way

    SELECT EXTRACT (YEAR FROM ADD_MONTHS (SYSDATE, 12 *(LEVEL-2)))

    OF the double

    connect by level<>

Maybe you are looking for

  • L850 - 1 5 satellite replacement battery - do not load and not detected!

    Hi, I recently bought a replacement battery for my Satellite L850 - 1 5 as the stock battery was fried. The stock battery couldn't hold a full charge for more than 10 minutes. The replacement battery fits perfectly into the battery compartment, but t

  • HP t610 more

    Hello We bought a few thin client (t610 more) the original of the BONE is W2009 shipped, I want to know if it is possible to upgrade to W2007? Thanks in advance

  • Office jet pro 8600: Ad hoc mode

    All the hp printers support the ad - hoc connection? How to configure the adhoc on 8600 settlement mode?

  • Synchronization of Media Player with Sansa Player

    Until the media player last week had no problem identification and synchronization with our Sansa e250 Sansa Clip.Now the media player not recognized either of these players.  The drivers are all up to date.  Device Manager gave me this information"W

  • If I restore my computer to factory settings, I'll be able to recover all my programs?

    I am wanting to restore my VAIO laptop to factory settings, but I am concerned about losing programs that I got with the computer of the plant, including several Adobe and Microsoft Office programs. These will be reinstalled with my recovery disks, o