How to get 4 months of sales data

Hello guys

I have the Sales table

Time by the month sales management

201501 10 100

201502 10 20

201503 10 90

201504 10 90

Acually I found this formula Time.Date < = cast (current_date- date) and Time.Date > = TIMESTAMPADD (SQL_TSI_MONTH,-3, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ( CURRENT_DATE) *-(1) + 1, CURRENT_DATE))

My question: is it for using the DATE, in fact, my time dimension is working hour per month? Current_date can be replaced by @{pvMonth} {2015-05}.

You cannot directly replace CURRENT_DATE (a date object) with @{pvMonth} {2015-05} because it is just a piece of text, not a date. So you must first create your varchar date and then you can use in date/time formulas.

Tags: Business Intelligence

Similar Questions

  • Is there one way other than to_char to get the month of the date field

    Is there one way other than to_char to get the month of the date field

    Hello

    raj4tech wrote:

    Is there one way other than to_char to get the month of the date field

    EXTRACT is one:

    SELECT INTERESTED (SYSDATE MONTHS) AS curr_month

    DOUBLE;

  • How to get more space to store data

    Hello

    I am newbie to ESXi 4.1. Recently I setup an ESXi 4.1 with the data store total 267 GB (146GBx3, RAID5), created 1 Win2008 Std 64 bit thick provisioned VM size 180 GB of disk & partition as C:\80GB, D:\100GB under Win2008, currently only 20,57 GB free data store space.

    (1) I try to create an another VM Win2008 standard 64-bit using typical/custom but max only allow 40 GB, how to get about 100 GB? (C:\60GB, D:\40GB)

    2) can I change existing VM thick to thin to follow steps of http://www.righteoushack.net/?p=419? what a C:\80GB, D:\100GB under Win2008? would it automatically resize so? or can I reduce existing 180 provided thick GB?

    (3) why there are 3 hard files created for a single virtual machine? how hard to remove? (see photo datastore.jpg)

    (4) as the system comes with Quard core 6 GB RAM & CPU, existing VM use 2 CPU4 GB of RAM, can I put a new virtual machine to use 2CPU4 GB RAM?

    Sorry, so many questions.

    Thank you and best regards,

    Kelvin

    Welcome to the VMware forums communities.  Your message has been moved to the forum of the Virtual Machine and the guest operating system.

    Dave

    VMware communities user moderator

    Now available - vSphere Quick Start Guide

    You have a system or a PCI with VMDirectPath?  Submit your specifications to Officieux VMDirectPath HCL.

  • How to get the multiple layers of data

    Hello

    I imported two jpg files into a single composition. Please follow this procedure...

    1 created a composition, say his name testCompo

    2 imported a file1.jpg in the file-> Import-> file draft

    3 imported a file2.jpg in the file-> Import-> file draft

    4. drag the two files, file1.jpg and file2.jpg, in the testCompo

    Now, I have two layers (it is file1.jpg and nested are file2.jpg) in my testCompo. How can I get the information in pixels or pixel data of the

    the two images (IE, I mean layers).

    I knew that params [0]-> u.ld is the first data layer in

    () EntryPointFunc
    PF_Cmd cmd,
    PF_InData * in_data,
    PF_OutData * out_data,.
    PF_ParamDef * params [],.
    PF_LayerDef * output,
    void * extra)

    So what about other data layer? Then, finally how can we get the multiple images/layers data in AE?

    Thanks in advance!

    It's the thing.

    You must have a param layer (let's say it's param number 3).

    Use this param to select any layer of the model.

    Now you checkout param 3.

    what you get is a paramDef structure containing the pixels of the layer 3 Advanced param to.

    you will find this information at:

    paramDef-> u.ld.data (or something close to that. I do not have in front of me)

    This way the jpg1 affect can get jpg2 pixels and jpg3. any layer in the comp.

  • How to display each month between the date range

    I want a query that gives me the number of months between two dates given for example, if I going January 1, 2009 and April 1, 2009 then I should get on February 1, 2009 and March 1, 2009 in my trips

    Thank you very much

    Srix wrote:
    Thanks for the request

    It is not working do not when the effective date is differs from that in a year i.e start date January 1, 2009 and end date February 1, 2009, that it does not give u then required result

    I don't know what you mean? The dates are in the same year.

  • How to get an hour on average data DAQ 6009

    I am a researcher. I ' am doing a job that requires constant tension of the DAQ 6009 map reading. Now all that his giving is very (for my work) fluctuating. So I need a medium-sized data from it during an interval of 100 ms or something. I can do through VI daq assistant or outside I do or is there a way solv EThis problem please reply.

    Hi perumpadapu.

    Yo did set sampling rate and size of block to get blocks of 100ms of data? Really?

    So why have the value "1 k"? This way you will get data every second...

    So I told you to use the average function to calc averages. You even tried it?

  • How to get the difference of two dates in months

    Dear friends,

    I have 4 items on my page.

    2 entered message text (value of loan, monthly deduction)

    2 are message style fields (start date, end date)

    I need to get the difference from above 2 dates in no.. of months. (for example say N)

    So with N, loanvalue should be divided and populated as monthly deduction.

    I tried this way, but not able to get the difference of dates

    {if ("populateMonthlyDeduction". Equals (PageContext.GetParameter (EVENT_PARAM)))}

    System.out.println ("enter populateMonthlyDeduction loop1");

    String xxDeductionStartDate = vo.getCurrentRow ().getAttribute("DeducStartDt").toString ();

    System.out.println ("xxDeductionStartDate is:" + xxDeductionStartDate);

    TXN OADBTransaction = am.getOADBTransaction ();

    java.sql.Date DeductionSDate = null;

    java.sql.Date DeductionEDate = null;

    if(xxDeductionStartDate!=null)

    {

    java.sql.Date startDate = txn.getOANLSServices () .stringToDate (xxDeductionStartDate);

    DeductionSDate = startDate;

    System.out.println ("DeductionSDate is:" + DeductionSDate);

    }

    String xxDeductionEndDate = vo.getCurrentRow ().getAttribute("DedEndDt").toString ();

    if(xxDeductionEndDate!=null)

    {

    java.sql.Date endDate = txn.getOANLSServices () .stringToDate (xxDeductionEndDate);

    DeductionEDate = endDate;

    System.out.println ("DeductionEDate is:" + DeductionEDate);

    }

    int difInDays = xxDeductionEndDate-xxDeductionStartDate; -Please correct me

    How reach it .plz help.

    Thank you

    Aravinda

    I used a custom like this method and calls this method daysBetween PFR.

    I got it. Thanks to you all.

    public int daysBetween(As Date, Date etDate)

    {

    return (int) ((etDate.getTime () - stDate.getTime (()) / (1000 * 60 * 60 * 24));

    }

    If ("populateMonthlyDeduction". Equals (PageContext.GetParameter (EVENT_PARAM)))

    {

    System.out.println ("enter populateMonthlyDeduction loop1");

    String dedStDt = vo.getCurrentRow ().getAttribute("DeducStartDt").toString ();

    String dedEndDt = vo.getCurrentRow ().getAttribute("DedEndDt").toString ();

    If (! dedStDt.Equals (null) &! dedEndDt.equals (null))

    {

    SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");

    Date sdate = new Date();

    Date edate = new Date();

    String sdate1 = null;

    String edate1 = null;

    try {}

    sdate = dateFormat.parse (dedStDt);

    EDATE = dateFormat.parse (dedEndDt);

    SimpleDateFormat dateFormat1 = new SimpleDateFormat("dd-MMM-yyyy");

    sdate1 = dateFormat1.format (sdate);

    edate1 = dateFormat1.format (edate);

    int days = daysBetween(sdate, edate);

    int diffInMonths = days/30;

    System.out.println ("days is:" + days);

    System.out.println ("diffInMonths is:" + diffInMonths);

    String sTotValueTuitionFees = vom.getCurrentRow ().getAttribute("TotValueTuitionFees").toString ();//pageContext.getParameter("LoanValue").toString();

    int iTotValueTuitionFees = Integer.parseInt (sTotValueTuitionFees);

    int iMonthlyDeduction = iTotValueTuitionFees/diffInMonths;

    String sMonthlyDeduction = String.valueOf (iMonthlyDeduction);

    System.out.println ("iMonthlyDeduction is:" + sMonthlyDeduction);

    OAMessageStyledTextBean bMonthlyDeduction = (OAMessageStyledTextBean) webBean.findChildRecursive ("MonthlyDeduction");

    bMonthlyDeduction.setValue (pageContext, sMonthlyDeduction);

    }

    catch (ParseException exception) e

    {

    }

    }

    }

  • How to get a manufactured HARD drive date?

    How to decode a serial number of the HARD drive to get the correct manufacturing date?

    I found some information, see the attachment below, but the HARD drive in question is SATA and serial number decodes to Feb 1997 which may not be correct.
    SN in question is 27MJFxxxx. Instructions below, 7 = 1997 - which would be 2007?

    Thanks for any help.

    -------------------------------------------------------------------------------------
    How to encode a Toshiba hard drive serial number?

    Toshiba serial number (S/N) includes the date of manufacture. The first digit of the serial number indicates the month of manufacture and the 2nd digit is the year.

    Example:
    M Y x x x x x x x
    M = month
    Y = year

    Data for the month goes from 1, for January, by 9 in September, then X, Y and Z, for October, November and December.

    Examples:
    2 8 1 7 0 0 0 1
    2 = February
    8 = 1998

    3 0 5 4 4 3 0 6 T
    3 = March
    0 = 2000

    X 9 7 8 3 3 1 T
    X = October
    9 = 1999

    The remaining digits contain information about the plant and the production line, and some numbers are reserved for a continuously running serial number.

    Hello

    I googled a bit and there are a lot of people that suggests how to read a serial number, I have no idea if he of right, but for example if you have a serial number: X7TO234534, then the product data would be October 2007 (X 7)
    X = 10 = October, Y = November, Z = Dec
    The first number is the month and the second digit is one year.

    So in your case, the serial number 27MJFxxxx should mean Feb 2007

    However, these are only some gossip on the internet and who knows if it of good or bad

  • How to get the Organizer"and"Accepted"data from a BlackBerryEvent

    Hi all

    -J' I send an invitation to the device of BB from Outlook
    -Once received, accept the appt to the BB email application

    When I view the appointment in the native calendar of BB, I can see the "Organizer" fields and "accepted."

    How can we get these data "Organizer" and "Accepted" to a BlackBerryEvent we will get only the PARTICIPANTSin an event.

    Using String email is event.getString(BlackBerryEvent.ATTENDEES,i);.

    any help in this please.

    Thank you

    Gerard

    No, you can get a list of the names of the participants, but not their status.

  • How to get out of deletion of data in the Editfield while moving on the text?

    Hello

    In my app, that I made as many sons to cause the HttpConnection.By using the Http call I get my data in string format, and I see in EditField.Each n each HTTP request, obtaining new channels and view in the new with EditField.Now page when I roll over the text or focus on the text , the text will be deleted means that the user cannot see once it is finished on that roll.

    That is, if the string is 'BlackBerry Support' and if I roll on the 'Support' and then it will be deleted.

    So, can someone give me the solution for this and how should I go out there with a proper resolution. ?

    Give all extracted code or any useful links or any other resolution for the same thing.

    Thank you

    Mishal

    Well,.

    I think that its problem of invalidate().

    First take the RichTextField EditField instead. You can display several data using RichTextField.RichTextField are more appropriate for this type of data.

    Second, invaqidate() Manager/fields within a method such as navigationMovement() of the screen. So then when you try to move to the up/down or left/right while the fields will be invalidate() and will update the entire data with the data.

    If that still do not work correctly then you can do using the vector. It's going to be a little hectic, but it will definitely solve your problem.

  • How to get the month previous year?

    Hello

    I have to get the previous year three-months of the effective date, but I have a problem since the beginning of the year and it's because I set the incorrect query.

    I mean:

    I wrote this query

    SELECT TO_CHAR(SYSDATE,'YYYYMM')-1, 2-TO_CHAR(SYSDATE,'YYYYMM'), TO_CHAR(SYSDATE,'YYYYMM')-3

    FROM DUAL;

    in order to get (on mars):

    201502, 201501, 201412

    but unfortunately, I get:

    201502, 201501, 201500

    Can you help me?

    Thanks in advance!

    Hello

    Here's one way:

    SELECT TO_CHAR (ADD_MONTHS (SYSDATE-1), "YYYYMM") AS the m1

    , TO_CHAR (ADD_MONTHS (SYSDATE-2), "YYYYMM") AS m2

    , TO_CHAR (ADD_MONTHS (SYSDATE,-3), "YYYYMM") M3

    DOUBLE;

  • How to get an array of SQL data

    Hello

    I need to get a say DBMS output output of a SQL SELECT query say * OF EMP in the form of a table (with borders and titles).

    Is this possible in Oracle to return a table with borders and titles?

    user13410062 wrote:

    Hi all

    I don't know what am I missing in my question, which is confusing. The only thing I'm looking for is invoking a procedure/function of TOAD/SQLPLUS that can turn a TABLE formatting based on a query (SELECT * from insert_table where insert_table is-)
    CREATE TABLE insert_table
    (
    Number of S_No
    Varchar2 (128) of the player.
    Number of Ranking_Points
    Country varchar2 (128)
    );
    Now the output is visible in the result of the query or DBMS_OUTPUT as

    >> > >

    S_NO PLAYERNAME RANKING_POINTS COUNTRY
    1 Rafael Nadal 12390 Spain
    2 Roger Federer 7965 Switzerland
    3 Novak Djokovic 7880 Serbia

    To add to what anton said...

    When you submit a SQL query to the database, the statement is executed and the data is returned to the calling program.  The database has no awareness of what this program is, or how this program can restore the data on the screen, and the database itself is not any output device to display data.

    Thus, the data can be returned to various programs for example

    SQL * Plus - a terminal/command line screen, which usually uses a font to fixed width and standard characterset

    TOAD - a windows based application that has a "data grid" to display the data, you get

    SQL * Developer - windows-based application

    Oracle APEX - one based on web front end that makes HTML given to it, or can take the data and rendered in the HTML form for you.

    PowerBuilder - an application environment that could choose to display the data in DataWindow, store the data in data warehouses, be an intermediary providing data as a web service or be rendered web pages with data, etc..

    .NET - like PowerBuilder, it might choose to make the data are however required.

    Java - like Powerbuilder and .NET, it might choose to make the data are however required.

    etc.

    Thus, each of these environment renders data on the screen but he wants and will do it in a style that suits.  Some methods that work in an environment do not work in another environment, for example, you could provide data with the tab character included in the data and SQL * Plus can restore data with tags in it, but something like TOAD, perhaps will not and displays a character box indicating an "unprintable" character etc..

    That's why you can't just ask a question say you want to provide a query and get a table with headings etc. displayed, because the table with headings etc. depends entirely on the final user interface until you choose to use.

  • How to get the names of all data centers in vSphere

    Hello

    The following code retrieves the path of ful of VMDK files.

    How can I get this info to all the domain controllers in my environment instead of questioning a DC at a time?

    CODE:

    Get-data center $DC | Get-Datastore. Where-Object {$_.} {Name - notlike "DataStore1 *"} |
    Sort-Object-property name.
    Select-Object - property name,
    @{Name = "CapacityGB"; Expression = {[Math]: tour ($_.)} (CapacityGB, 0)}},
    @{Name = "UsedSpaceGB"; Expression = {[Math]: tour ($_.)} CapacityGB-$_. (FreeSpaceGB, 0)}},
    @{Name = "FreeSpaceGB"; Expression = {[Math]: tour ($_.)} (FreeSpaceGB, 0)}},
    @{Name = "UncommittedSpaceGB"; Expression = {}
    If (-not $_.) ExtensionData.Summary.Uncommitted) {}
    0
    }
    else {}
    [Math]: tour ($_.) ExtensionData.Summary.Uncommitted/1GB,0)
    }
    }},
    @{Name = "ProvisionedSpaceGB"; Expression = {}
    $Summary = $_. ExtensionData.Summary
    If (-not of $Summary.Uncommitted) {}
    [Math]: round (($Summary.Capacity-$Summary.FreeSpace)/1GB,0)
    }
    else {}
    [Math]: round (($Summary.Capacity-$Summary.FreeSpace + $Summary.Uncommitted) / 1 GB, 0)
    }
    }},
    @{Name = "PercentageUsed"; Expression = {[Math]: round (100 *($_.)} CapacityGB-$_. FreeSpaceGB) / $_. (CapacityGB, 0)}},
    @{Name = "PercentageFreeSpace"; Expression = {[Math]: round (100 * $_.)} FreeSpaceGB / $_. (CapacityGB, 0)}},
    @{Name = "PercentageProvisioned"; Expression = {}
    $Summary = $_. ExtensionData.Summary
    If (-not of $Summary.Uncommitted) {}
    [Math]: round (100 * ($Summary.Capacity-$Summary.FreeSpace)/$Summary.Capacity,0))
    }
    else {}
    [Math]: round (100 * ($Summary.Capacity - $Summary.FreeSpace + $Summary.Uncommitted)/$Summary.Capacity,0))
    }
    }},
    @{Name = 'MV'; Expression = {[string]: join (';', ($_.))} ExtensionData.Vm | ForEach-Object {Get-View-Id $_}). Name)}}.
    @{Name = "VMDK"; Expression = {[string]: Join (';', (& {}}
    $Datastore = $_
    $Datastore.ExtensionData.Vm |
    {ForEach-Object
    Notice-EEG-Id $_.
    Get-VIObjectByVIView |
    Get-hard drive |
    Where-Object {$_.} FileName-like "* $($Datastore.Name) *"} ".
    }
    }). File name)

    }} | Export-CSV $FileName - NoTypeInformation - UseCulture

    The easiest way is to make equal $DC to ' *'.

  • How to get the required connection pool data source?

    Hi we have created two pools of connections with two different userid to restrict access to the database. now I have 2 pools. so if I want to get the connection to a specific pool how to do this?

    Use the JNDI string. When you created your pools you created the jndi names. So when connecting to the data source, you specify jndi. That's how.

    Your postal code if you have a problem.

  • How to get an auto update to date field?

    Hi friends,

    Hope you do well,

    I use version Jdev - 11.1.2.4. I have 2 fields named lastUpdatedBy and lastUpdatedDate, every time that a user login and change anything on the page, then these 2 fields are automatically updated by his user name and the current date.

    Can anyone help on this...

    Thanks in advance.

    http://docs.Oracle.com/CD/E16162_01/Web.1112/e16182/bcentities.htm#ADFFD201

    https://www.adftraining.com/blog/bloggers/how-to-use-history-columns-in-Oracle-ADF-for-mini-auditing

Maybe you are looking for

  • Installation of Windows XP on a Satellite L40-14B

    I bought a toshiba Satellite L40 - 14B with nothing on it, and I can not install xp on it because the hard drive is sata.Can someone help me pls? I don't have a usb floppy drive. Where can I find the driver for the hard drive and how do I add it for

  • SL500 and I want to add more RAM

    Howdy. I have a new Thinkpad SL500, such as here: http://www.hemini.com/products/product_details.aspx?prodid=425737&cp=1&sc=1&sct= It has an Intel Core 2 Duo (T6670) 2.2 GHz processor and 2048 MB of RAM. I want to add more RAM to make it even more ef

  • creating a bar chart...

    .. two questions, one probably simple and the other a bit complicated: 1. the chart should show 64 points on the X axis. How can I specify the "grease" my bar? 2. the boss says he wants that all values of different color: red-blue-red-blue-red-blue..

  • my computer crashed during the factory install.

    My hp envy touchsmart crashed while trying to return to the factory settings. I received a message before trying it saying something to the subject 32/LogiLDA.dll missing.this message happens every time that I turned it on.i would factory reset disks

  • problem with calendar in windows live mail 2012 (win 7)

    Hello I received an email this morning saying I need to download a patch in order to continue to receive mail to my 7 2012 windows live mail. I installed the patch and restarted direct mail and my emails were there, but all my calendar items have dis