How to create a join like: year between start and end

Hello all I have got a dimension and a fact.
normally in sql I would use the following:
fact.year between dimenstion.start_year and dimension.end_year
When I use this, then OBIEE says I have to use operators
So now I am trying:
fact.year > dimension.start_year and fact.year < dimension.end_year
But now OBIEE is saying that I must use the equel operator...
My question is how can I make this type of join?

Thanks for your quick answer... I am trying this now...

Similar Messages

  • Drawing small, short curves in Photoshop draws straight line between start and end points

    I recently installed Windows 8 Professional, Photoshop and the latest Wacom Bamboo tablet drivers and have been experiencing this issue. I've turned off windows flicks and ink. This only happens in Photoshop with the brush tool and I can't seem to find a setting that this corresponds to.
    Basically, when I draw small, short curves (particularly letters like 'c' and 'h'), when I lift up my pen, Photoshop automatically connects the end and start points together with a straight line ('c' almost becomes 'o' or 'a'). I'm not holding the shift or any modifier keys. I've tried googling this issue, but I have no idea how to phrase it properly to get any results.
    Here's an image of what I'm talking about (the top was drawn with the pencil tool, the bottom with the brush tool which demonstrates the issue. I've highlighted the start and end points with red dots):
    ANy ideas? :/

    Is caps lock on?

  • How to determine minutes per week with inconsistent start and end times...

    ver -> 10.2.0.4
    I'm looking for some guidance or some pseudo code in how to attack the following:
    Data
    target_nm  status       start_timestmap       end_timestamp
    DEVDB      Target Up    8/28/2009 9:49:08 AM  9/26/2009 6:34:23 PM
    DEVDB      Target Down  9/26/2009 6:34:23 PM  9/26/2009 6:36:23 PM
    DEVDB      Target Up    9/26/2009 6:36:23 PM How can I display, per week, the number of minutes a status was held? There are 10,080 minutes per week and I'm using to_char(to_date('8/28/2009 9:49:08 AM', 'mm/dd/yyyy hh:mi:ss AM'), 'WW') to determine the week number. The end result would be something like, in example:
    target_nm   wk    up           down
    DEVDB       35    [x minutes]  [y minutes]This, at first, seemed pretty straight forward, but where it gets wrapped around the axle is that the records of a status can span a number of weeks between the 'start_timestamp' and the 'end_timestamp.'
    My current approach is to isolate this down for a given day...if something is "started" then determine the number of minutes between trunc(start) +1 and start . If it has "ended" then determine the number of minutes between trunc(ended) and end.
    Resulting in something like:
    target_nm    status     day_of_year  minutes_of_status start_timestamp       end_timestamp
    DEVDB        Target Up  8/27/2009    296.3333          8/27/2009 7:03:40 PM  nullAny advice, a different perspective, or pseudo code would be greatly appreciated on how to turn the corner on showing these status's as they break down per week.
    Regards,
    -abe

    Hi,
    As you said, you just need to compute SUM (end_timestamp - start_timestamp), GROUPing BY week.
    The tricky part is what happens when an event is not entirely within one week. For example:
    DEVDB      Target Up    1/07/2009 11:00:00 AM  1/08/2009 2:00:00 PMThis event lasted 3 hours, but you want to count this as 1 hour in week '01', and 2 hours in week '02', not as 3 hours in either week.
    The solution is very much like the one in the following thread:
    [8i] Date/Time calculation problem...
    Whenever you have a problem, post a little sample data (CREATE TABLE and INSERT statements) and the results you want from that data.
    Edited by: Frank Kulash on Mar 16, 2010 12:16 PM

  • Find Conflicts between start and end time

    I have a table appointment (appointment_id, start, end ,  Location) will hundreds of records like below
    appointment_id        start                                                    
    end                                            Location
    1                            2015-04-29 10:00:00.000              2015-04-29 12:00:00.000            
             ABC
    2                            2015-03-29 09:00:00.000         2015-03-29 13:00:00.000             
    XYZ
    3                           2015-03-29 10:00:00.000         2015-03-29 11:00:00.000             
    XYZ
    if you see appointment id 2 and 3 they are conflicting with same location
    appointment id2 starts at 9 am and ends at 1pm ,
    but appointment id3 also reserved  same day & same location start at 10am and ends at 11 am ..
    this should not be possible ....
    can you help in finding how many such conflicts are there in the  appointment table ?
    i will have to find a report...
    Thanks

    Hi coolguy123SQL,
    Regarding your description, does the appointments happened in the same prefixed locations with a time span overlap mean a conflict? If my understanding is correct, you may reference the below code.
    DECLARE @myTable TABLE (appointment_id INT, startDateTime DATETIME, endDateTime DATETIME, location VARCHAR(10))
    INSERT INTO @myTable
    SELECT 1, '2015-04-29 10:00:00.000', '2015-04-29 12:00:00.000', 'ABC' UNION ALL
    SELECT 2, '2015-03-29 09:00:00.000', '2015-03-29 09:30:00.000', 'XYZ-123' UNION ALL
    SELECT 3, '2015-03-29 10:00:00.000', '2015-03-29 11:00:00.000', 'XYZ-456' UNION ALL
    SELECT 4, '2015-03-29 11:00:00.000', '2015-03-29 13:00:00.000', 'XYZ-789'
    ;WITH CTE AS
    SELECT appointment_id,startDateTime,endDateTime,location,
    CASE WHEN CHARINDEX('-',location)=0 THEN location ELSE SUBSTRING(location,1,CHARINDEX('-',location)-1) END AS locationID FROM @myTable
    CTE2 AS
    SELECT *, ROW_NUMBER() OVER(PARTITION BY locationID ORDER BY startDateTime) AS seq FROM CTE
    SELECT
    c.appointment_id conflict_appmt_id1,c.startDateTime startDateTime1,c.endDateTime endDateTime1,c.location location1,
    t.appointment_id conflict_appmt_id2,t.startDateTime startDateTime2,t.endDateTime endDateTime2,t.location location2
    FROM CTE2 c JOIN CTE2 t ON c.locationID=t.locationID and c.endDateTime>=t.startDateTime AND c.seq<t.seq
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Generate all Months between start and end dates using Parameter

    Hi,
    I have a query in which i have two dates that is Start Date and End Date and now i have to populates all the Months between the date range:
    Start Date : APR-12
    End Date: JUL-12
    Now taking these two values i want the recors as displayed below
    APR-12
    MAY-12
    JUN-12
    JUL-12
    So how can write my SQL query to finish this task
    Thanks

    Sounds easy with single pair of Months:
    with data(st_dt, end_dt) as
      select to_date('JAN-2012', 'MON-YYYY'), to_date('SEP-2012', 'MON-YYYY') from dual
    select add_months(st_dt, level - 1  ) mons
      from data
    connect by level <= months_between(end_dt,st_dt) + 1;
    MONS   
    01-JAN-12
    01-FEB-12
    01-MAR-12
    01-APR-12
    01-MAY-12
    01-JUN-12
    01-JUL-12
    01-AUG-12
    01-SEP-12
    9 rows selected Please ensure to read {message:id=9360002} and post the question correctly with all the mentioned points in the thread. It facilitates the people to understand the problem clearly and provide a solution that is compatible with your Oracle Version.

  • Generate all the quarters between start and end dates

    Hello all,
    I have a query in which i have two dates that is Start Date and End Date and now i have to populates all the quarters date between the date range:
    For eg:
    Start Date : 1-Apr-2011
    End Date: 1-Jul-2012
    Now taking these two values i want the recors as displayed below
    Apr 2011
    Jul 2011
    Oct 2011
    Jan 2012
    Apr 2012
    Jul 2012
    So how can write my PL/SQL query to accomplish this task
    Thanks in advance

    958964 wrote:
    Hello all,
    I have a query in which i have two dates that is Start Date and End Date and now i have to populates all the quarters date between the date range:
    For eg:
    Start Date : 1-Apr-2011
    End Date: 1-Jul-2012
    Now taking these two values i want the recors as displayed below
    Apr 2011
    Jul 2011
    Oct 2011
    Jan 2012
    Apr 2012
    Jul 2012
    So how can write my PL/SQL query to accomplish this task
    Thanks in advanceHow do I ask a question on the forums?
    SQL and PL/SQL FAQ
    solution can be done in SQL only; no PL/SQL.

  • How to create a clock with: a reset, start and stop

    How can i create a clock that have to do the following thing:
    Countdown visual in the screen
    Timeset with day's in seconds
    - Pressing start -> it start to run
    - Pressing stop -> The clock is stopping but it keeps the time, when i press start again then it goes on with counting
    - Pressing Reset -> the clock goes back to the start position and waits to start again.
    Tia, William
    Running with Labview 6.1
    Fieldpoint hardware

    The key is to use a shift register to hold the previous count...
    Attached is a quick and dirty version of what you describe. It displays the passed time as seconds so if you need it to be in days just divide the value by 86400...If you don't need sub-second updates you can increase the wait time.
    MTO
    Attachments:
    Stopwatch.vi ‏39 KB

  • How to create a "Explorer" like in java

    i'm just wonderin if there's a way on how to create "Windows Explorer" like in Java wherein you can view all your directories with yellow folder icon and also you can view all your files and drives....
    And when you double click the yellow folder icon it will then expand and will show all the subfolders and files ...
    How????
    Thanks!

    Yes, there is a way. Look up JTree in the API.-can you post some code.... i cant figure out on how to use JTree...
    i'm still confused on where will i get the entire directories of my drives...
    thanks

  • How to create report image like artwork demo

    Dear Pakars
    How to create report image like artwork demo ?
    Thanks
    Imansyah

    Hello,
    Are you asking how to include images in a report? If so, take a look at the declarative blob support documentation -
    http://www.oracle.com/technology/obe/apex/apex31nf/apex31blob.htm
    Hope this helps,
    John.
    Blog: http://jes.blogs.shellprompt.net
    Work: http://www.apex-evangelists.com
    Author of Pro Application Express: http://tinyurl.com/3gu7cd
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

  • Do you know how to create Front Panel like Web,

    Do you know how to create Front Panel like Web, I mean like we pointed the word and click it will do another process instead by clicking push button.
    If possible, i can click the link in the table... Any idea anyone
    Solved!
    Go to Solution.

    Hi ezam,
    can you define more clearly exactly what you would actually like to do, and ill have a further look into it. I think smercurio_fc has understood it as I have, and is right with the activeX.
    any way, give a shout back with exactly what you want to do and we see what we can do,
    Richard
    Richard S
    Applications Engineer
    Certified LabVIEW Associate Developer
    National Instruments UK&Ireland

  • Can anyone please guide me how to create a table like employe table with 10

    Hi,
    can anyone please guide me how to create a table like employe table with 10colums.
    after that we need to update the colums with personal details......like name1,name2,address,city,zip...etc.
    using the RFC we need to update the personal details coulums (either select query or Insert command)
    if you have any program logic similar to this requirement please share with me...that would br greatly helpfull to me...
    thanks in advance
    srinivas

    Hi....
    We are having one table and now i am going to update that table's fields...
    for that in RFC function module we need to enter the fields in importing parameters (which are mandtory in table)
    and in source code just write like following....
    ( try to under stand that it contains some previous used table nad field and stucture and work area and function module names)
    FUNCTION ZL2C_UPDATE_MYCUSTOMER.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(USR_ID) TYPE  USRID
    *"     VALUE(LOGO_ID) TYPE  KUNNR
      DATA ls_mycust TYPE zl2cmy_customer.
      DATA: name1 TYPE name1_gp.
      DATA: sharpoint_url TYPE url.
      ls_mycust-usr_id        = usr_id.
      ls_mycust-logo_id       = logo_id.
      SELECT SINGLE name1 FROM kna1 INTO name1 WHERE kunnr = logo_id.
        ls_mycust-name1       = name1.
        SELECT SINGLE sharpoint_url FROM zl2c_CUSDASHBRD INTO sharpoint_url WHERE logo_id = logo_id.
          ls_mycust-sharpoint_url = sharpoint_url.
          INSERT into zl2cmy_customer values ls_mycust.
          COMMIT WORK.
        ENDFUNCTION.

  • How to create a report in Form line Style and can display Image field?

    Hi,
    In Report builder 10g, I would like to create a Report with Form Line Style and this report included a Image field.
    I can choose this Style only when Select Report type is Paper Layout. Because, If I choose Create both Web & Paper Layout or Create Web Layout only then in the next Style tab 03 option Form, Form letter and Mailing Label be Disabled.
    But in Paper Layout, my report can not display Image field.
    I tried with Web layout and all the other Styles (Except 03 mentioned be Disabled) then all Styles are displayed Imager field OK.
    How to create a report in Form line Style and can display Image field?
    I was change File Format property of my Image field from text to Image already in Property Inspector. But report only showed MM for my Image field.
    Thanks & regards,
    BACH
    Message was edited by:
    bachnp

    Here you go..Just follow these steps blindly and you are done.
    1) Create a year prompt with presentation variable as pv_year
    2) Create a report say Mid report with year column selected 3 times
    - Put a filter of pv_year presentation variable on first year column with a default value say @{pv_year}{2008}
    - Rename the second time column say YEAR+1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)+1
    - Rename the second time column say YEAR-1 and change the fx to CAST(TIME_DIM."YEAR" AS INT)-1
    Now when you will run Mid Report, this will give you a records with value as 2008 2009 2007
    3) Create your main report with criteria as Year and Measure col
    - Change the fx for year column as CAST(TIME_DIM."YEAR" AS INT)
    - Now put a filter on year column with Filter based on results of another request and select these:
    Relationship = greater than or equal to any
    Saved Request = Browse Mid Report
    Use values in Column = YEAR-1
    - Again,put a filter on year column with Filter based on results of another request and select these:
    Relationship = less than or equal to any
    Saved Request = Browse Mid Report (incase it doesn't allow you to select then select any other request first and then select Mid Report)
    Use values in Column = YEAR+1
    This will select Year > = 2007 AND Year < = 2009. Hence the results will be for year 2007,2008,2009
    This will 100% work...
    http://i56.tinypic.com/wqosgw.jpg
    Cheers

  • How to create labeled table of Content with expand and collapse

    Hi All,
    Can somebody help me how to create labeled table of Content with expand and collapse as example given below:
    User1
    Template1
    Template2
    User2
    +
    User3
    Template1
    Template2
    Like when we see expand (+) and collapse (-) button when we click on 'about this page' link.
    Thanks
    Bhupendra

    Hi,
    Tou can use Table inside table to show the details this way but I'm not sure about Expand/Collapse.
    Expand/Collapse are part of HGRID.
    I think we can develop this functionality with little manipulation.
    Regards,
    Reetesh Sharma
    Edited by: Reetesh Sharma on Jun 28, 2010 4:56 AM

  • How to create a cube/ods/infoobjects etc..and also  why to create the same

    Dear Friends
    how to create a cube/ods/infoobjects etc..and also  why to create the same objects.
    thanks & Regards
    Ramana

    Hi Friend,
    Creating Infoobjects
    1. Go to RSA1 -> Modelling tab.
    2. Click on Infobjects.
    3. Create a new Infoarea.
    4. Now create Infoobject Catalog for Characterstics and Key Figures.
    5. Now create Char Infoobject under Char Catalog and Key figure Infoobject under Key Figure catalog.
    Creating Cubes:
    1. Right click the info area and choose create info cube.
    2. Select the type of cube you wish to create and comnfirm your selections.
    3. The next screen is where you actually define the cube.
    4. Now you will notice the difference.
    5. Place your cursur on key fig and right click and chose infio object direct input; chose your key fig for the cube.
    6. Similarly for the dimension; right click the dimension and chose inbfo object direct input, chose your chars and out them in dimension.
    7. Activate the cube.
    Creating a ODS is also the same.(in step 1 choose create ODS)
    Creating Multicube/Multiprovider
    1. Right click the info area - chose create multi provider.
    2. select the cubes , DSOs, info objects that you need for the multi provider.
    3. On the right side of the screen, you will see all the objects that you selected and open the key fig and dimension and drag the ones you need to define the multi provider.
    4. Identify the chars and key figs.
    5. Acvitate the mullti provider.
    Why we create them ?
    Infobjects : They are fields in R/3. As we require fields in R/3 tables we require infoobjects in BI.
    ODS : This actually is like a table in R/3.
    Cube : This contain the Key figures.(e.g Sales quantity, Amount etc)
    Hope it helps.
    Regards
    Hemant Khemani

Maybe you are looking for