Discoverer Date Parameters

Hi,
How can i perform for user date parameters to get the result of
From Date To Date (2007) Sales , From To Date(2006)
It is required in view that having sales of 2 Years 2006,2007 and the user
need to compare sales of period in 2007 with same period in 2006
Regards
Hassan

hi hassan,
for having from-date & to-date parameters in ur report its better to create 2 parameters with the same names & define a condition using "between" option along with those parameters in discoverer itself.
coming to comparison of 2 years data like "this year & last year" you should mention these in ur query itself like below:
hope it will b helpful for ur report.
all the best_Rakesh Reddy.
SELECT A.Region,A.Account,A.Door,A.Location,A.retailer_month,A.week,SUM(A.Netretlsold_TY) as Netretlsold_TY,SUM(A.Netretlsold_LY) as Netretlsold_LY FROM
SELECT
NVL(TY.Region,LY.Region) as Region,
NVL(TY.Account,LY.Account) as Account,
NVL(TY.Door,LY.Door) as Door,
NVL(TY.Location,LY.Location) as Location,
NVL(TY.RETAILER_MONTH,substr(LY.RETAILER_MONTH,1,2) || to_char(to_number(substr(LY.RETAILER_MONTH,-4))+1) ) as RETAILER_MONTH,
NVL(TY.WEEK,LY.WEEK) as Week,
NVL(TY.Netretlsold,0) as Netretlsold_TY,
NVL(LY.Netretlsold,0) as Netretlsold_LY
FROM
SDW.ST_WK_SALES_SUM_MV TY
FULL OUTER JOIN SDW.ST_WK_SALES_SUM_MV LY
ON
TY.Door=LY.Door
AND TY.RETAILER_MONTH = substr(LY.RETAILER_MONTH,1,2) || to_char(to_number(substr(LY.RETAILER_MONTH,-4))+1)
AND TY.WEEK = LY.WEEK
) A
GROUP BY A.Region,A.Account,A.Door,A.Location,A.retailer_month,A.week;

Similar Messages

  • How can I reference records outside the two date parameters?

    Hi all,
    I have a query that fetches records based on the two date parameters defined (Startdate and Enddate).
    If the Startdate is 2014-12-01 and the Enddate is 2014-12-12, I want to pull records outside these two date parameters, that is      2014-09-01 and 2014-11-30.
    I want to add up the records from  2014-09-01 and 2014-11-30 and include them in one of the columns in my report.
    I tried using this query:
     SUM(CASE WHEN FilteredIncident.Statuscodename IN ('QUEUED', 'ASSIGNED') AND (EnteredOn >= '2014-09-01' AND EnteredOn<= @StartDate) THEN 1 ELSE 0 END) AS OpenRecords
    Please help with any ideas..thanks

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you probably need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    There is no such crap as a “status_code_name” in RDBMS. It has to be a “<something in particular>_status”; think about how silly that data element name is! Want to keep going and have a “status_code_name_value_id”? LOL! 
    The name “Filtered_Incident” is also wrong. Tables are sets, so unless you have only one element in this set, the table name should be a plural or (better) collective name. But a better question is why  did you split out “Filtered_Incidents” from “Incidents”?
    Would you also split “Male_Personnel” and “Male_Personnel” from “Personnel”? 
    Get a book on data modeling and learn some basics. 
    >> I have a query that fetches records [sic: rows are nor records] based on the two date parameters defined (report_start_date and report_end_date). If the report_start_date is 2014-12-01 and the report_end_date is 2014-12-12, I want to pull records [sic]
    outside these two date parameters, that is 2014-09-01 and 2014-11-30. I want to add up the records [sic] from 2014-09-01 and 2014-11-30 and include them in one of the columns in my report. <<
    Having no DDL and no sample data makes this hard. Does your boss make you program without any documentation, DDL, etc? This spec is vague; you say to do a total, but show a count, etc. 
    One of the many nice things about DATE data types is that the BETWEEN predicate works with them, so you can quite writing 1960's BASIC predicates with primitive logic operators. 
    Here is a guess: 
    SELECT SUM(CASE WHEN incident_date BETWEEN '2014-09-01' 
               AND @report_start_date THEN 1 ELSE 0 END)
           AS open_record_cnt 
      FROM Incidents
     WHERE incident_status IN ('QUEUED', 'ASSIGNED')
        AND incident_date <= @report_end_date; 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Problem with passing date parameters in cursor

    Is there any problem in passing date parameters and like clause as below
    CURSOR eftcursor(start_date DATE, end_date DATE, where_clause varchar2) IS
    select * from r_records
    where created_date between start_date and end_date and description like where_clause;
    and in the open statement
    select to_date('01/06/2010 00:00:00', 'dd/mm/yyyy hh24:mi:ss') into startDate from dual;
    select to_date('01/07/2010 00:00:00', 'dd/mm/yyyy hh24:mi:ss') into endDate from dual;
    str := '%something%aaaaa%';
    open eftcursor(startDate ,endDate , str);
    Do i need to do any kind of conversion in the cursor where clause or when i am passing the parameter in open statement.

    Almora wrote:
    Do i need to do any kind of conversion in the cursor where clause or when i am passing the parameter in open statement.No, your code looks correct -- ou're passing a date to the cursor.
    You might consider whether you really need an explicit cursor though. An implicit cursor is easier to code and performs better.

  • Date Parameters in Report

    Hello,
    I am using the Where property of an Open Report for date parameters.  There are reason i can not use the query criteria process.
    Can I do this with more than one parameter?
    Private Sub EligibilityReportPreview_Click()DoCmd.OpenReport "EligibilityRpt2",acViewPreview,,"effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate"End Sub
    How do add another parameter like
    DoCmd.OpenReport "EligibilityRpt2", acViewPreview, , "effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate"
    Or "termination_date >= LowTerminationDate And termination_date <= HighTerminationDate"
    Gee

    If all names referred to are fields in the record source of the report, you can use
    DoCmd.OpenReport "EligibilityRpt2", acViewPreview, , "effective_date >= LowEffectiveDate And effective_date <= HighEffectiveDate Or termination_date >= LowTerminationDate And termination_date <= HighTerminationDate"
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Date Parameters

    Hi,
    Please see my query below,
    I'm having a bit of trouble with my date parameters.
    If $P{from_date} = 01-Jan-2010
    and $P{to_date} = 02-Jan-2010
    Is there a reason why i'm not getting any data for 02-Jan-2010?
    It's probably something simple that i'm missing.
    select
    count(tag_id),
    itl.sku_id,
    itl.client_id,
    itl.reference_id,
    sum(itl.update_qty),
    to_char(trunc(itl.dstamp), 'DD-Mon-YYYY') rec_date,
    to_char(sysdate, 'DD-Mon-YYYY | HH24:MI:SS') as systemdate,
    to_char(trunc(itl.expiry_dstamp), 'DD-Mon-YYYY') exp_date,
    s.ship_shelf_life as sku_shelf_life,
    s.ship_shelf_life + 2 as plus_shelf_life,
    (trunc(itl.expiry_dstamp) - (s.ship_shelf_life + 2)) - trunc(sysdate) as plus_days_left,
    (trunc(itl.expiry_dstamp) - (s.ship_shelf_life + 2)) - trunc(itl.dstamp) as plus_days_left_when_rec,
    (trunc(itl.expiry_dstamp) - trunc(itl.dstamp)) as clear_days
    from inventory_transaction itl, sku s
    where s.sku_id = itl.sku_id
    and ($P{from_date} is null or ($P{from_date} is not null and itl.dstamp >= to_date($P{from_date}, 'DD-Mon-YYYY')))
    and ($P{to_date} is null or ($P{to_date} is not null and itl.dstamp <= to_date($P{to_date}, 'DD-Mon-YYYY')))
    and itl.code = 'Receipt'
    group by itl.sku_id, itl.client_id, to_char(trunc(itl.expiry_dstamp), 'DD-Mon-YYYY'), to_char(trunc(itl.dstamp), 'DD-Mon-YYYY'),
    itl.reference_id, s.ship_shelf_life, s.ship_shelf_life + 2, (trunc(itl.expiry_dstamp) - (s.ship_shelf_life + 2)) - trunc(sysdate),
    (trunc(itl.expiry_dstamp) - (s.ship_shelf_life + 2)) - trunc(itl.dstamp), (trunc(itl.expiry_dstamp) - trunc(itl.dstamp))
    order by itl.client_id, itl.sku_idThanks in advance,
    SM.

    Sam Mardell wrote:
    Is there a reason why i'm not getting any data for 02-Jan-2010?Yes :) Every date has an hours, minutes and seconds component. When you apply the TO_DATE() function on a character string that just contains month, day, and year the time component defaults to midnight (00:00:00). There are multiple methods to get around this:
    < to_date($P{to_date}, 'DD-Mon-YYYY') + 1
    <= to_date($P{to_date} || '23:59:59', 'DD-Mon-YYYY HH24:MI:SS')
    <= to_date($P{to_date}, 'DD-Mon-YYYY') + (60*60*24 - 1)Above are just examples, there are many more ways to achieve this.
    HTH!

  • Date parameters using MDX query

    Hello experts,
    Not sure if this question falls under SSAS or SSRS but I'm writing it here for now and hopefully get the answer.
    I'm using SSAS cube to develop a report using SSRS and this is the first time I'm doing it. I want to filter records based on date range and did some research online. My report contains two datasets:
    1. dsMain dataset -> it contains all the field which I want to use in the report and added a parameter thru query designed with following settings:
    Dimension : Dates
    Hierachary : Date
    Operator : Range (Inclusive)
    Parameters : checked
    it created two parameters called FromDatesDate and toDatesDate
    2. I created another dataset called dsDate and wrote a custom query (found at following link) and changed FromDatesDate and ToDatesDate using this date dataset
    https://jsimonbi.wordpress.com/2011/03/22/using-a-date-parameter-in-ssrs-with-mdx/
    Query for dsDate
    WITH
    MEMBER DateValue
    AS
       [Dates].[Date].CurrentMember.UniqueName
    MEMBER DateLabel
    AS
       [Dates].[Date].CurrentMember.Name
    SELECT
        [Measures].[DateValue],
        [Measures].[DateLabel]
    } ON 0,
         [Dates].[Date].[Date]
    } ON 1
    FROM [myCube]
    Here is the value returned by dsDate dataset (above query)
                            DateValue                          DateLabel
    06/04/1980 [Dates].[Date].&[29375]
    06/04/1980
    06/05/1980 [Dates].[Date].&[29376]
    06/05/1980
    06/06/1980 [Dates].[Date].&[29377]
    06/06/1980
    06/07/1980 [Dates].[Date].&[29378]
    06/07/1980
    06/08/1980 [Dates].[Date].&[29379]
    06/08/1980
    06/09/1980 [Dates].[Date].&[29380]
    06/09/1980
    06/10/1980 [Dates].[Date].&[29381]
    06/10/1980
    06/11/1980 [Dates].[Date].&[29382]
    06/11/1980
    06/12/1980 [Dates].[Date].&[29383]
    06/12/1980
    06/13/1980 [Dates].[Date].&[29384]
    06/13/1980
    Here is what I changed in FromDatesDate and ToDatesDate parmeter:
    Under Available Values tab:
    Dataset : dsDate
    Value Field : DateValue
    Label Field : DateLabel
    Here are my questions:
    1. I want to use date/time parameter so that user doesn't have to scroll thru whole date dimension.
    2. I changed the FromDatesDate and ToDatesDate to date/time parameter, removed the values from Available values tab and made the following changes on Parmaeters expression under dsMain dataset
    =”[Dates].[Date].&[” + Format(CDate(Parameters!FromDatesDate.Value),”MM/dd/yyyy”)
    + “T00:00:00]”
    =”[Dates].[Date].&[” + Format(CDate(Parameters!ToDatesDate.Value),”MM/dd/yyyy”)
    + “T00:00:00]”
    Now when I run the report I get following error:
    Query (1, 55) The restrictions imposed by the CONSTRAINED flag in the STRTOMEMBER function are violated.
    I think the reason is by changing parameter to date/time, now I cannot get "DateValue" which is required for the query.
    1. What is the best way to work with date parameters?
    Hope it is all clear and look forward to hear from experts.
    Thanks,
    P
    mark it as answer if it answered your question :)

    Hi Parry2k,
    In Analysis Services, a member can be referenced by either its member name or by its member key. The member key is used by the dimension to specifically identify a given member. The ampersand (&) character is used in MDX to differentiate
    a member key from a member name. In this scenario, the datetime is member name, not the member key. So you should not add "&".
    Reference:
    Member Names and Keys
    Simon Hou
    TechNet Community Support

  • Controling Date Parameters using SRW.DO_SQL in Reports!

    Hello Friends,
    I Need to Control the Date Parameters in Reports.
    (Dev/2000 rel2.1) In SRW.Do_SQL package
    For Example:
    'Insert into x
    select * from Y
    where Y.date between f_date and t_date';
    Here: X,Y are two tables
    f_date and t_date are two different date parameters in
    format (dd-mm-yyyy).
    NOTE: Without these two date parameters, the Query is working
    fine. But I need to Use these Parameters. Could You Please find a
    solution for Me. Thanks in advance.
    Regards
    Manoj (India)
    (Dt:18thNov'99)
    null

    Manoj (guest) wrote:
    : Hello Friends,
    : I Need to Control the Date Parameters in Reports.
    : (Dev/2000 rel2.1) In SRW.Do_SQL package
    : For Example:
    : 'Insert into x
    : select * from Y
    : where Y.date between f_date and t_date';
    : Here: X,Y are two tables
    : f_date and t_date are two different date parameters
    in
    : format (dd-mm-yyyy).
    : NOTE: Without these two date parameters, the Query is working
    : fine. But I need to Use these Parameters. Could You Please
    find a
    : solution for Me. Thanks in advance.
    : Regards
    : Manoj (India)
    : (Dt:18thNov'99)
    Hi Manoj
    your goal is to supply all three as dates (y.date, f_date,
    t_date). if some of them are not date but char, varchar, ...
    then use to_date conversion function with proper format mask.
    hope this helps.
    null

  • Error when using Date Parameters...

    Hi everybody,
    I have a little issue.
    Ever since I upgraded my CRXI R2 to SP4 I've had a little problem using date parameters.
    The little calendar icon next to the parameter field no longer works.
    When I click it I get the following error message:
    An error has occurred in the script on this page.
    Line:       79
    Char:      1
    Error:      Object Expected
    Code:      0
    URL:       file://C:\Documents and Settings\jlong\Local Settings\Temp\prompting1.html
    I'm thinking this is probable a quick registry fix, but I have no idea where to start looking.
    Hopefully one of you CR guru's knows the answer.
    Thanks in advance,
    Jason

    It seems you are having a scripting issue.
    Go onto the Internet explorer settings (internet options under control panel)
    click on security and then click on Internet and then Custom tab.
    Scroll right down where it says Scripting and enable it.
    That should resolve the issue.
    Here is the full list of browsers with scripting options:
    Windows Internet Explorer
    (all versions except Pocket Internet Explorer)
    Note To allow scripting on this Web site only, and to leave scripting disabled in the Internet zone, add this Web site to the Trusted sites zone.
    1. On the Tools menu, click Internet Options, and then click the Security tab
    2. Click the Internet zone.
    3. If you do not have to customize your Internet security settings, click Default Level. Then do step 4
    If you have to customize your Internet security settings, follow these steps:
    a. Click Custom Level
    b. In the Security Settings u2013 Internet Zone dialog box, click Enable for Active Scripting in the Scripting section.
    4. Click the Back button to return to the previous page, and then click the Refresh button to run scripts.
    ===========
    Mozilla Corporationu2019s Firefox version 2
    1. On the Tools menu, click Options.
    2. On the Content tab, click to select the Enable JavaScript check box.
    3. Click the Go back one page button to return to the previous page, and then click the Reload current page button to run scripts.
    ===========
    Opera Softwareu2019s Opera version 9
    1. On the Tools menu, click Preferences.
    2. On the Advanced tab, click Content.
    3. Click to select the Enable JavaScript check box, and then click OK.
    4. Click the Back button to return to the previous page, and then click the Reload button to run scripts.
    ===========
    Netscape browsers
    1. Select Edit, Preferences,Advanced
    2. Click to select Enable JavaScript option
    Hope this helps.
    Regards
    Jehanzeb
    Edited by: Jehanzeb Navid on Jul 28, 2008 4:38 PM
    Ok I think I got this totally wrong. this isn't what you are looking for.
    Sorry!!! can't delete this reply arggghh!!!
    Edited by: Jehanzeb Navid on Jul 28, 2008 4:40 PM
    Maybe this might help?
    Remove Web Customization
    If multiple folders are causing the script error, remove Web customization from any folder that generates the error message.
    To remove customization from a folder, use the following steps:
    1. Open the appropriate folder.
    2. On the View menu, click Customize This Folder, click Remove Customization, click Next, and then click Finish.
    3. Close the folder.

  • How to use Count with Date Parameters

    Hello,
    I am having issues using the Count() function in conjunction with date parameters.
    This is a Siebel report and in my report I have 2 date parameters(From Date, To Date). In a nutshell I am basically trying to count Opportunities that has a start date within the given date period. However I don't see a reasonable way to put my date parameters within the Count() function. The reason being is that I need to have a huge chunk of code to convert the dates into a common format that can be compared, and it won't even fit within the code block in my rtf template. I am not even sure how to put multiple conditional statements inside a Count() function since all the examples I have seen are very simple.
    Anyone have a suggestion on how to use Count() with date parameters?
    Thanks.

    Any chance you can get the date formats in the correct format from siebel?
    I don't know Siebel - so I can't help you with that. If you get the correct format it is just
    <?count(row[(FromDate>=date) and  (date<=ToDate))?>
    Otherwise the approach would probably need to use string function to get year/monthd/day from the date
    and store it into a varialbe and compare later the same way
    <?variable@incontext:from; ....?>
    <?variable@incontext:to; ...?>
    <?count(row[($from>=date) and  (date<=$to))?>
    Potentially you can use the date functions such as xdofx:to_date to do the conversion
    [http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T481158.htm]
    But I am not sure if they are available in your siebel implementation.
    Hope that helps

  • Error with date parameters - Object expected,  res://ieframe.dll/syntax.htm

    I am porting a report done in CR X to CR 2008, so I can distribute it to a third party. When I preview it and enter my date parameters, I get and address not found html page. When I close this page, I get an error stating that an object was expected, line 1, char 1, code 0, URL res://ieframe.dll/syntax.htm.
    The report worked great in CR X.

    start removing all parts to see what needs to be fixed up

  • Defaulting Date Parameters

    Post Author: tegage
    CA Forum: Formula
    I have many reports that allow the user to specifiy a starting and ending date range.  I would like the reports to default to all dates.  I can do this by defaulting the start date to "01-01-2000" and the end date to "12-31-2099", but then the calendar tool is useless since there is no TODAY button on the calendar tool and it picks up the default date, i.e., the users will have to do a lot of scrolling through the calendar tool.
    The other way is to make the starting and ending date parameters strings and use values like Today, This Week, This Month,....  and reolve them in the record selection formula.   This would be nice, but then if the user wants a specific date range, they don't have the calendar tool to use.
    Is there a way to take advange of the user-friendliness of string values and still have the calendar tool to use?

    Post Author: tegage
    CA Forum: Formula
    Thanks much for the response. 
    I had done exactly what you described - I had a string parameter for Today, This Week, etc and a set of date parameters - Starting and Ending Date.  But, in order to use the Starting and Ending dates in a formula, I had to provide them a default value - leaving them blank causes the record selection formula to explode.  The issue here is that the calendar tool picks up the default value instead of showing today's date. 
    I did more web surfing and found the answer on the Business Objects web site.  The solution let me do what you suggested AND keep the Starting and Ending date parameters as Date types and defaulted to blank by making them optional parameters.
    From the Business Objects web site (why isn't this stuff in the user's guide?):
    2.  Control over default values.
    3.  Request for an 'ALL' value.
    Both of requirements 2 and 3 are met with the new optional parameter feature of CR 2008.  When a parameter is flagged as 'optional', the report can execute without that value being set.  The trick here is that any formula that attempts to reference an optional parameters that doesn't have a value set will return an error.  So we've introduced the new HasValue() function which allows you to check and see if the parameter has a value. 
    This is really powerful, because now you can reference your parameters indirectly through another formula (or custom function) that checks if the parameter has a value or not.  If it does, then the formula returns the parameter value.  If it doesn't, then it can return whatever default value you wish.  So if you want the default to be the day before, or last Friday, then you can code that logic into your formula that uses HasValue to check if the parameter has a value set or not.
    Optional parameters were also intended to solve the 'All' problem.  Basically, you want a parameter to participate in a record selection formula only if it has a value.  If it doesn't, then you want that filter to be disabled.  By using optional parameters and HasValue() in your record selection (and new saved data section) formulas, you can include conditions in your filter only if the parameters in those conditions have a value.

  • Default date parameters to trunc(sysdate,'IW') in BI Pub Reports 11G

    Hi All,
    I have a requirement to default the date parameters in the BI Pub Report to the following when the reprot is scheduled to run.
    Start Date - Trunc(sysdate,'IW') - 8
    End date - Trunc(sysdate,'IW') - 2
    Steps followed:
    1. I have created 2 Date parameters in the data model as :P_START_DATE and :P_END_DATE.
    2. Created one data set with the query select Trunc(sysdate,'IW') - 8 "P_START_DATE" ,                                 Trunc(sysdate,'IW') - 2   "P_END_DATE
    I have used the same names for the dates so that they are referenced, but its not working as expected.
    Is there any other step i need to follow so that when i run the report from the dashboard, these default values populate which should be editable also.
    Can anyone please help.
    Thanks &Regards
    Geetha

    Hi Neeraj
    Not null parameters are not supported in the current release. All you could do it either default a value in there for the user - check the doc for details. Or drop a msg into the report if that value was null and not return any data. The second is not great I admit :0)
    Tim

  • Pass date parameters to dataprocessor in Java

    Hello I have created java class to execute data templates, but I have problem when I pass date parameters as it was from application dataprocessor fails without any error message and does not return any data (except output xml file header). How to pass date parameters correctly?
    import java.sql.*;
    import oracle.apps.xdo.dataengine.DataProcessor;
    import com.sun.java.util.collections.Hashtable;
    class oraConn
    public static void main (String args []) throws SQLException
    System.out.println("Start");
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    java.util.Properties ora_property = new java.util.Properties();
    Connection conn =
    DriverManager.getConnection("jdbc:oracle:thin:user/pass@host:port:sid");
    try {
    DataProcessor dataProcessor = new DataProcessor();
    dataProcessor.setDataTemplate("/home/user/definition.xml");
    Hashtable parameters = new Hashtable();
    parameters.put("c_period_start_date","2009/01/01 00:00:00");
    parameters.put("c_period_end_date","2009/12/31 00:00:00");
    parameters.put("c_employed_before_date","");
    parameters.put("c_org_hierarchy","63");
    dataProcessor.setParameters(parameters);
    dataProcessor.setConnection(conn);
    dataProcessor.setOutput("/home/user/Out.xml");
    dataProcessor.processData();
    } catch (Exception e)
    {System.out.println ("Data procesor Fail.");}
    } catch (SQLException ex) {
    System.out.println ("\n*** SQLException caught ***\n");
    while (ex != null) {
    System.out.println ("SQLState: " + ex.getSQLState ());
    System.out.println ("Message: " + ex.getMessage ());
    System.out.println ("Vendor: " + ex.getErrorCode ());
    ex.printStackTrace();
    ex = ex.getNextException ();
    System.out.println ("");
    }}}}

    Found out solution to my problem. I needed to import date not as string but as Date type.

  • Default date parameters with timestamps

    Hi everyone!
    I have an user request that I thought should be fairly simple, but I cannot quite get it working.
    We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
    For example:
    20-MAR-2009 00:00:00
    20-MAR-2009 23:59:59
    I thought this would be a simple sql statement, but Apps does not seem to agree.
    The parameters are of type FND_STANDARD_DATE.
    What we have tried:
    select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
    , to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
    from dual
    -- did not work, said looking for DATE format --
    select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
    , to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
    from dual
    -- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
    Any ideas?
    Thanks!
    Janel
    (apologies for the double post - what exactly is the difference between the 2 EBS forums?!?!?)

    Your second code snippet is correct - it works in my instance :-)
    SQL> alter session set NLS_DATE_FORMAT='DD-MON-YYYY HH24:MI:SS';
    Session altered.
    SQL> select to_date(to_char(sysdate, 'DD-MON-YYYY') || '00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE,
      2  to_date(to_char(sysdate, 'DD-MON-YYYY') || '23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE from dual;
    P_BEG_DATE                 P_END_DATE
    20-MAR-2009 00:00:01       20-MAR-2009 23:59:59HTH
    Srini

  • Default date parameters

    Hi everyone!
    I have an user request that I thought should be fairly simple, but I cannot quite get it working.
    We have a concurrent request with beginning and ending date parameters. The users have requested that these dates default to the beginning/end of the current day.
    For example:
    20-MAR-2009 00:00:00
    20-MAR-2009 23:59:59
    I thought this would be a simple sql statement, but Apps does not seem to agree.
    The parameters are of type FND_STANDARD_DATE.
    What we have tried:
    select to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01' p_beg_date
    , to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59' p_end_date
    from dual
    -- did not work, said looking for DATE format --
    select to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 00:00:01', 'DD-MON-YYYY HH24:MI:SS') P_BEG_DATE
    , to_date(to_char(sysdate, 'DD-MON-YYYY') || ' 23:59:59', 'DD-MON-YYYY HH24:MI:SS') P_END_DATE
    from dual
    -- works for beg date, but not end date, both display time as 00:00:01 ( I believe i was having issues in TOAD trying to get it as 00:00:00) --
    Any ideas?
    Thanks!
    Janel

    Thank you amox!!
    This gives me 3/20/2009 12:00:24 AM for p_beg_date and 3/20/2009 11:59:36 PM for p_end_date.
    Do you think there is anyway to get the seconds to be 00 for p_beg_date and 59 for p_end_date?
    Also, the concurrent program parameters are actually FND_STANDARD_DATETIME, not FND_STANDARD_DATE as I thought earlier.
    Thanks,
    Janel

Maybe you are looking for

  • How do I de-activate home sharing on dead computers? I have already used my allowed 5 spots, but only have 2 com puters!

    Over the years, I have authorized 5 computers for home sharing.  3 of the computers haved crashed, and are long gone.  I can't find any resolve to de-authorize those 3 computers from home sharing.  I am hoping to find the option, to de-authorize, and

  • Ipod - erased disk... now ipod only turns on and off

    I had problems with my 3rd gen ipod skipping through songs. At the suggestion of the genius at the local apple store - I was to go to disk utility and erase my hard drive (using zero out function) and then reload my songs in itunes. about 4 hours int

  • Global ATP with product allocations and SD returns

    Dear all, We have  been setting up an implementation scenario with an ECC 6.0 and SCM 5.0 system which verifies SD orders versus SCM product allocations. With SD orders and SD contracts everything works fine. But we have a problem with using SD retur

  • Style overflow problem

    Hi, I used to 3 months ago that kind of declaration <div style="overflow:auto;"> - header of IR </div> - Footer of IRand it was working fine - today in firefox 3.5 it works fine only when I'll specifie width and height (but only body of region, not a

  • Looping a stored procedure

    Can someone explain to me how I loop a stored procedure ? I have a stored proc that deletes users. it works fine. set serveroutput on begin BTNEP.DEL_USERPROC (p_employee_id=>'11111'); end; I have a list of over 1,000 employee_id's that need to be de