PASS DATE as parameter

Hi all,
I have a mapping which i need to pass in 2 DATE parameters, i try in OWB with TO_DATE('1-Jan-1990') and TO_DATE('1-Jan-2010') and i get result as my expected. But when i try to run the mapping sqlplus with following statement, I get difference kind of error (when i keep change method to pass in date)
SQLPLUS <user>/<Password>@ODSDEV @SQLPLUS_EXEC_TEMPLATE.SQL OWB10R2REP_ODS UBD2STAGE_LOC PLSQL MAP_CE_USER "," "F_DATE=TO_DATE(''1-JAN-1990''),T_DATE=TO_DATE(''1-JAN-2010'')"
please help!
ek

Hi
I had try with the format you advice and i get following error:
Error     RPE-01003: An infrastructure condition prevented the request from completing.     
     Error     RPE-01038: Failed to evaluate expression declare l_expression DATE := '2010.01.01';begin :result := wb_rt_conversions.from_date(l_expression);end;. Please modify the expression, redeploy and retry again.     
     Error     ORA-01861: literal does not match format string ORA-06512: at line 1
I try to change the date the statement to
sqlplus <User>/<password>@odsdev @SQLPLUS_EXEC_TEMPLATE.SQL OWB10R2REP_ODS UBD2STAGE_LOC PLSQL MAP_CE_USER "," "F_DATE=''1990.01.01'',T_DATE=''2010.01.01''"
and
sqlplus <User>/<password>@odsdev @SQLPLUS_EXEC_TEMPLATE.SQL OWB10R2REP_ODS UBD2STAGE_LOC PLSQL MAP_CE_USER "," "F_DATE=1990.01.01,T_DATE=2010.01.01"
but still not able to run the mapping successful. please help!!
EK

Similar Messages

  • Pass date range parameter  to SQL stored procedure.

    Hi,
    I'd like to pass a date range parameter from Crystal Reports to a sql stored procedure. Does anyone know if this is possible?
    I've had no problem passing standard datetime (single value) paramaters to and from but am struggling with getting a range value parameter to work.
    Environment: Crystal Reports 10/XI and SQL 2000 MSDE version or SQL 2005 Express Edition.
    Any help would be appreciated.

    C5112736 wrote:>
    > And then these 2 formulas 'Formula # 1' and 'Formula # 2' can be used to pass on to the stored procedure.
    Can someone please demonstrate exactly how to use formula results as date parameters to a SQL stored procedure?  Keep in mind, there are two parameters to the stored procedure.
    I have gleaned this much: Use Add Command and insert the procedure with
    EXEC ServerName.dbo.usp_sprocName;1 '{?StringParameter}'
    but if I try to do
    {CALL ServerName.dbo.usp_SprocName({@Formula1},{@Formula2})}
    then it gives the error "No value given for one or more required parameters". 
    Both of the parameters are VARCHAR(50).
    I have finally found this link: [http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx|http://msdn.microsoft.com/en-us/library/ms710248(VS.85).aspx]
    This Microsoft site defines the format of the ODBC escape sequences, but I still do not know how to convince Crystal to insert it's parameter results or formula results.
    Pulling what's left of my hair out . . .
    ~ Shaun

  • Problem while passing date as parameter

    Hi
    i need to compare the last_update_date of oe_order_headers_all by input parameter date. i tried like this but i dint succeed. can you please edit my program that has to compare the existed last_update_date date of oe_order_headers_all
    create or replace procedure xx(p_date in date)
    is
    v_count number;
    begin
    select count(*) into v_count
    from oe_order_headers_all
    where (to_date(last_update_date,'DD:MON:YYYY:HH24:MI') >TO_DATE(P_DATE,'DD:MON:YYYY:HH24:MI'));
    dbms_output.put_line(v_count);
    exception
    when others then
    dbms_output.put_line(sqlerrm);
    end;
    when i pass the p_date as '13-APR-2006'
    Edited by: Sravprem on May 5, 2011 8:09 AM

    Sandeep
    I thought you dint understand my question. to compare the dates i have to bring the two dates into one format. i cant able to bring in one format. i am asking how compare to dates? i hope u understand my problem..
    while trying like this
    select count(1)
    into v_count
    from oe_order_headers_all
    where to_date(last_update_date,'DD:MON:YYYY') <TO_DATE(P_DATE,'DD:MON:YYYY');
    i got an error
    ORA-01841: (full) year must be between -4713 and +9999, and not be 0

  • Error while passing date parameters in procedure and commit issue

    Hi
    1) I am doing a archiveing records and pls find my code below and i have couple of issue,pls find my code and want to ensure the commit is happening every 100000 rows inserted but i am archeiving a huge table but when i checks the table frequently it shows 0 records and after it shows count the actual rows around 20 million records.How can i ensure it commiting on every 100000 records. pls find my code my db version is 10g on windows
    CREATE OR REPLACE PROCEDURE doins as
    cnt number:=0;
    FOR x IN (select * from Call_log
    where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY'))
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where trunc(c_date) = to_date('11-Aug-2008','DD-MON-YYYY');
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    2) Error while passing date as parameter i am getting following errors while passing date parameter pls find my code and errors
    CREATE OR REPLACE PROCEDURE doins(p_date date) as
    cnt number:=0;
    begin
    FOR x IN (select * from Call_log
    where trunc(c_date) = to_char(p_date,'DD-MON-YYYY'))
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where trunc(c_date) = to_char(p_date,'DD-MON-YYYY');
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    end;
    exec doins(11-Aug-2008) then gives
    SQL> exec doins(11-Aug-2008);
    BEGIN doins(11-Aug-2008); END;
    ERROR at line 1:
    ORA-06550: line 1, column 16:
    PLS-00201: identifier 'AUG' must be declared
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    if i gave exec doins(11-08-2008) it gaves
    ERROR at line 1:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'DOINS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    rgds
    rosh

    CREATE OR REPLACE PROCEDURE doins(p_date varchar2) as
    cnt number:=0;
    begin
    FOR x IN (select A.rowid,A.* from Call_log A
    where trunc(c_date) = to_date(p_date,'DD-MON-YYYY'))
    --hope that's c_date columne is   DATE datatype
    LOOP
    INSERT INTO call_arch
    select * from Call_log
    where rowid=x.rowid;
    cnt := cnt + 1;
    IF( cnt = 10000 )
    THEN
    cnt := 0;
    commit;
    END IF;
    commit;
    END LOOP;
    end;
    thats your correct procedure - but NOT CORRECT ISSUE.
    You should use bulk collect with limit clause and forall clause to do it faster!!! Or Merge clause.

  • Regarding Date Range parameter

    hello,
    in purchase order, i want to pass date range parameter. For eg .
    I want to fetch data from 21/11/2011 to 25/11/2011
    how to pass parameter for this?? or do i need to create any formula??
    if yes then how/???????
    awaiting for soonest reply.

    hi,
    you need to do this in the Formula workshop.
    this formula {OPOR.DocDate} = {?DateRange}
    {OPOR.DocDate} - this is the PO DocDate
    {?DateRange} - this is what you have done in step #4 in my 1st post. in this example "DateRange" is the name of my Parameter.
    Quote from you post
    {OPOR.DocDate} = {?25/11/2011 to 30/11/2011} In this way should i write a formula??????
    change this {?25/11/2011 to 30/11/2011} to the name of your Parameter. refer to step #4.
    regards
    Fidel

  • How to pass date parameter from one page to other in BSP application

    Hello gurus,
    In my BSP application i have taken an input field and made its type "date" and its value also of type date and have set showhelp .
    Now once a particular date is given as an input i want to pass its value to next page. And in next page i have to fire a query based on the date entered in previous page...
    Now my prb is that my date value is not getting passed to the next page.
    I have used
    navigation->set_parameter( name = 'BEGDA' value = BEGDA ).
    to pass date parameter.....still parameter is not getting passed.
    plz help me with this.....
    thankx.....

    Hi Eddy,
    By truncation i mean the entire date becomes 10 char including the ' . ' eg(06.12.2006).
    so with begda being 8chars it takes my date as 06.12.200
    as a result my query is not getting executed.
    now i have tried to use a FM  'CONVERT_DATE_TO_INTERN_FORMAT'.
    in my 1st page but still in 2nd page its giving me following error.
    <b>The data that was read could not be written to the specified target field during a SELECT access. Either the conversion is not supported for the type of the target field, or the target field is too short to accept the value, or the data is not in the appropriateformat for the target field.
    </b>
    Regards
    Swati

  • Passing Date as IN parameter

    Hi Gurus,
    I have already searched teh discussion forums but couldn't find any solution.
    I have a SP in which I want to pass an IN parameter as Date datatype.
    While running the SP how to pas Date value as IN param?
    For eg If I need to pass 05-09-2007
    Thanks

    SQL> create or replace function f1(p1 date)
      2  return varchar2 is
      3  begin
      4   return p1||' is '||to_char(p1,'Day');
      5  end;
      6  /
    Function created.
    SQL> exec dbms_output.put_line(f1(sysdate));
    16-OCT-07 is Tuesday
    PL/SQL procedure successfully completed.
    SQL> exec dbms_output.put_line(f1(to_date('05-09-2007','dd-mm-yyyy')));
    05-SEP-07 is Wednesday
    PL/SQL procedure successfully completed.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Passing data parameter between SWF files

    Hello Xcelsius Gurus,
    Is it possible to pass data parameter between SWF files?
    If possible, how to achieve it?
    Thank you.
    Justine

    Hi,
    Thank you for the reference.  Little bit confused, please let me clarify. 
    I do not understand how the receiver SWF receieved the data parameter and process.
    For example, I have a parent dashboard and a child dashboard.  In the parent dashboard, I have set up combo box to filter the data.  And I want the data that I have selected in combo box to the child dashboard.
    To do this, first I need to setup the flash variable at the parent dashboard to fetch the data I selected.
    After this, how to link this data to the child dashboard?
    Furthermore, after the child dashboard received the data parameter, I need this data to insert into the spreadsheet so I can filter the data.  Is this possible?
    Thanks.
    Edited by: Justine Liu on Jan 19, 2010 3:11 PM

  • How to auto login and pass data (parameter) to ApEx at the same time

    Does anybody know how to automatically login to apex (e.g. from JSP page) and pass a parameter value at the same time? I can use wwv_flow_custom_auth_std to login, I can even choose a page but I cannot pass any data (at least I do not know how). If I use f?p URL syntax I can pass data but there is no way to pass login/password information.
    Any idea? Thanks Jaros

    Jaros -
    You could copy your login page and make the new page "public". On the new page, add a process before the login process that sets the value of application item FSP_AFTER_LOGIN_URL to the report page URL (with the arguments), e.g.,   :FSP_AFTER_LOGIN_URL := 'f?p=&APP_ID.:100:&SESSION.::NO::P100_X,P100_Y:&RPT_VALUE1.,&RPT_VALUE2.';Create application-level items RPT_VALUE1 and RPT_VALUE2 in the application.
    From your external page, POST to this new "login" page, passing values for the username, password, rpt_value1, and rpt_value2 items.
    Let us know if it works.
    Scott

  • Parameter Form to Pass Dates to Report

    Hi,If anyone have a sample Form that passing
    date parameters to a report so that a report can select only the Date ranges passed from the Parameter Form. I need to set up a trigger at the Form Control block. Thanks.

    For your 1st problem it seems to be a bug in Forms 6i - you can visit this site:
    http://pipetalk.revealnet.com/~plsql/
    and find there 41211.
    Helena

  • Missing Data in Table passed as Function Parameter

    I am running a JCO server & in my handleRequest(), I am trying to get the data from the tables paased as function parameters from the SAP system.
    Somehow I am not able to see any data in the tables, though the SAP system has put some data in the tables before sending.
    The no. of rows in the table is 0 always on the JCO side. I tried to dunp the content of the Function & Table with writeHTML() & it shows no data too.
    I am able to pass simple strings & integers, but the tables doesn't work. Can anyone tell me where might be the problem.

    Hi,
       I am bit confused, You are not getting the data in the Function module when you make a call from Java or the data returned by the function module is not reaching the Java side. If you are not getting the data which you pass from java in the function module then I have faced this problem before.
    In that case the problem was when you pass data as table parameters to the function module you have to check the size of table parameter I was using INITIAL to check if there is any data in the table parameter. If this is the same problem may be by checking the size of the table will solve your problem.
    Regards,
    Sesh

  • How to pass series of dates (between startdate and enddate) to subreport, which takes only one date as parameter

    Relatively new to Microsoft report services. I have created a report which takes a single parameter named 'SelectedDate'. This report runs fine (uses complex query of hours of the selected date and complex joins & aggregate calculations between SQL
    database tables). I created a new report with two parameters, namely, StartDate and EndDate. Also created a sql stored procedure which gives all dates between StartDate and EndDate. Added subreport to this report which calls my first report and defined 'SelectedDate'
    parameter to get the value as "=First(Fields!dt.Value, "DataSet1") - where dt is the resultset of procedure called in DataSet1. When I run this report, in the subreport, all I see is the report for 'StartDate' which is the passed
    value of the first parameter. I can't find a way to pass entire array of dates as parameter, to which user can browse forwards and backwards. Any idea? Thanks in advance for your help!

    HI Visakh16..Never mind my comment..I tried it again. This time I went to the completion of previewing..and noticed that the table with DataSet1 does display dates and first report underneath but once I click any other date, it displays the subreport on
    full page and navigation back arrow (with hint 'back to Parent Report) solution is not bad..so unless you a way to achieve my desired layout mentioned above - I am good for now! Thanks for your pointer in right direction!
    One small observation for thread readers: When I published the report to the report server, the back button (back to Parent Report) which was available to me at design time, is not displayed at client's browser. Upon checking pertinent threads, concluded
    that this is known issue for years and recommendation I concluded from various threads is: Use back button of browser and it should (& did) keep the parent report page, with table with selected dates intact. A few have noticed different behaviour
    for older browser versions. 

  • Passing date parameter from prompt

    Hi experts
    I am getting some problem while passing date from a dashboard prompt.
    In RPD i have changed the date column properties as DATE only so that i will get the DATE part of the data not the time stamp.
    Now in the dashboard prompt i added a prompt for the date column.
    I initialized the date prompt with a server variable of sysdate
    when i am running the dashboard i am getting default value in the prompt(04/15/2011)
    when i am changing the date it is selected as(04/15/2011)
    but when i am clicking the 'Go' button the date is converting to 2011-04-15 00:00:00 due to which my report is not running and i am getting error as
    View Display Error
    A date value was expected (received "2011-04-15 00:00:00").
    Error Details
    Error Codes: QABPH2PO
    can anyone help me to pass only date part
    thanks in advance
    regards
    Gourisankar

    Hi J / Srikanth
    Sorry to restart the thread again.
    As we discussed i have downloaded the patch and applied to my windows 32 bit machine.
    But now when i run the report the report is running only for the default value(Server Variable) which is specified to the prompt. when i change the date there is no effect to the report.
    When i drill down to the report i found that the date column(is prompted) is changed to teh server variable name which is might be the cause.
    any input on this???
    regards
    Gourisankar

  • Unable To Pass Input Page Parameter Using PageDef File.

    Dear All,
    I am currently exploring task flows as I dont have that much knowledge in it.
    Here's my use case
    1. I setup a taskflow which has a Method Call and a View Activity in it.
    2. The method call is a default activity which just calls a web service.
    3. After execution, I just wanted to display the result of the method.
    I used input page parameters to pass data between the method call and the view activity.
         (I passed the data by accessing the pagedef file directly. I know I can do it using pageflowscope..but this is
         my self exercise so that I could understand ADF fully );)
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
      <task-flow-definition id="ManageEmployeeTaskflow">
        <view id="viewEmployee">
          <page>/viewEmployee.jsff</page>
          <input-page-parameter>
            <from-value>#{data.com_test_ManageEmpFlow_methodPageDef.empInfoIterator.currentRow.dataProvider.name}</from-value>
            <to-value>#{data.com_test_viewEmployeePageDef.name.inputValue}</to-value>
          </input-page-parameter>
        </view>
        <method-call id="EmployeeSetup">
          <method>#{bindings.EmployeeSetup.execute}</method>
          <outcome id="__12">
            <fixed-outcome>viewEmployee</fixed-outcome>
          </outcome>
        </method-call>
        <use-page-fragments/>
      </task-flow-definition>
    </adfc-config>Problem is, when I display the data. Nothing is being displayed.
    <af:inputText value="#{bindings.name.inputValue}"
                      label="#{'Name'}"/>          I debug the taskflow and the <from-value> really has a value, but I am not sure why it cant be passed to next pagedef.
    Any idea please?
    Edited by: Marky on May 15, 2011 11:25 PM

    Hi,
    I've been thinking... Is this way of passing parameters not possible?
          <input-page-parameter>
            <from-value>#{data.com_test_ManageEmpFlow_methodPageDef.empInfoIterator.currentRow.dataProvider.name}</from-value>
            <to-value>#{data.com_test_viewEmployeePageDef.name.inputValue}</to-value>
          </input-page-parameter>Thanks.

  • 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.

Maybe you are looking for

  • Issues with Windows 7

    Hello,   After running every compatibility check I could find, I recently upgraded my computer from Vista to 7 Professional. Everything works fine except for my Adobe CS4 Production Premium Suite. I can open Photoshop and Flash without a problem, but

  • Safari crashing within seconds after opening running Lion 10.7.4 here is my crash report

    Process:         Safari [1153] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         5.1.7 (7534.57.2) Build Info:      WebBrowser-7534057002000000~1 Code Type:       X86-64 (Native) Parent

  • API for clearing cache of page items

    Is there an API for clearing the cache of page items? I see there is a procedure called CLEAR_PAGE_CACHE in APEX_UTIL package to clear the cache of all the items on a page, but wanted the equivalent for an item. Maybe I'm making this harder than need

  • Possible problems with Check out and Open Component and delayed publishing

    Hi, I've experienced some seemingly wrong behaviors of the checkout and open component and also with the delayed publishing feature, I've listed it down : 1) The all important one: We know we've delayed publishing features for content, if we set the

  • Moving a set number of frames

    I'm ashamed I have to ask this, but I can't find the code anywhere Instead of prevFrame(); which only goes back to the previous frame, I would like to go back THREE frames. This seems like it should be so easy, but I just can't find the right command