Need help pass in date parameter into bat file.

Is it possible to schedule sql job to execute bat files and pass in date below.
I want to take a system date and pass into the bat file below.  A Schedule Job will run on Monday at 9 P.M.
I want to automate this process instead manually enter into the bat file.  Is that possible?
Any suggestions is appreciate.  SQL 2012
Thank you so much in advance.
SQL Schedule job
DECLARE @sMonday VARCHAR(25) = REPLACE(CONVERT(VARCHAR(10), GETDATE(), 1), '/', '')
SET @sMonday = @sMonday + '_qa48_Clonedb'
SELECT @sMonday
--021315_qa48_Clonedb
DECLARE @sPrevMonday VARCHAR(25) = CAST(REPLACE(CONVERT(CHAR(10), DATEADD(DAY, - (DATEPART(dw, GETDATE() ) - 1), GETDATE() ),1), '/', '') AS CHAR(6))
SET @sPrevMonday= @sPrevMonday + '_qa48_Clonedb'
SELECT @sPrevMonday
--020815_qa48_Clonedb
Result want:
-- Testbatfile.bat
REM 021615_qa48_Clonedb
SET sToday = @sMonday        
SET sPreviousWeek = @sPrevMonday
SET sNumOfDay=07
DiskMirror -l snapsrvcfdba n4brec01a -i privkey.ppk "snap rename sql32oltp_repl_dataf sqlsnap__brpRMSDVS050a__recent %sToday% "
DiskMirror -l snapsrvcfdba n4brec01a -i privkey.ppk "snap rename sql32oltp_repl_logf  sqlsnap__brpRMSDVS050a__recent %sToday% "
DiskMirror -l snapsrvcfdba l9ABC01d -i privkey.ppk "snap rename sql100oltp_repl_dataf %sPreviousWeek% sqlsnap__ABCPWSCVR050a__%sNumOfDay% "

See
https://sharminjahan625.wordpress.com/2013/08/30/384/
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Need help in loading data from a csv file to a table in Oracle DB

    Hi,
    I am using sqlplus as a client to connect to the server.
    I am trying to load data from a csv file from a client to a table in Oracle DB server.
    I am trying to use the below command
    " LOAD DATA INFILE 'test.csv' INTO TABLE testTable FIELDS TERMINATED BY ',' (test1,test2,testc3,testc4); "
    But, I am encountered with the following error
    "SP2-0042: unknown command "load data" - rest of line ignored."
    Thanks in advance.
    SB

    Hey Frostmann,
    That was a nice post....
    I changed my mind to use an 'Insert into' statement from a shell script.
    I created a DB table named test and I tried using the below shell script to insert a row in the table.
    sqlplus test/test@test <<ENDOFSQL
    INSERT INTO test VALUES('test1',123,'test2','test3');
    exit
    ENDOFSQL
    A row is succesfully inserted into the table when I run the script manually, but it does not insert rows when a cron job is scheduled.
    Could you please help me with this?
    Thanks in advance.
    SB

  • Boss is gonna kill me. I Need help inserting a DATE/TIME into MSAccess

    Hello,
    I have spent way to long trying to figure out how to insert a date into the date/time field of a microsoft access database. Could someone please help me figure this out. I know there are a million previous posts about this topic and i looked through a bunch and none of them seem to work... i have tried so many different things. The code i am working (at this point in time.. since it has changed a million times) is:
                             String MYDATE = "yyyy-MM-dd hh:mm:ss a";
                             Date date = new Date();
                             String dateout = new SimpleDateFormat(MYDATE).format(date);
                             System.out.println(" the date is " + dateout);
    Timestamp timeStamp = new Timestamp(date.getTime());
    timeStamp.setNanos(0);
                             System.out.println(" the date is " + timeStamp);
                             String sql2 = "INSERT INTO DATE5 (stuff, date) VALUES ('hello', CVDATE(" + timeStamp + "))";
                             ProblemTrackingDB.DoUpdate(sql2);
                             sql2 = "INSERT INTO DATE5 (stuff, date) VALUES ('hello', '" + dateout + "')";
                             ProblemTrackingDB.DoUpdate(sql2);
    i have tried both of those ways and either work (ie... comment one out and try the other)
    i always get a " Syntax error in INSERT INTO statement" thrown
    i have also tried without the single quotes.
    Any help would Be MUCH appreciated as my boss is starting to get agrivated...
    thanks to anyone who helps,
    Jon

    Change your program to use a PreparedStatement to do this insert. You only need to create a PreparedStatement once, so in your constructor or initializer do this:PreparedStatement insert = connection.PrepareStatement("INSERT INTO DATE5 (stuff, date) VALUES (?, ?)");Then the code to write a record is this:Timestamp timeStamp = new Timestamp(date.getTime());
    timeStamp.setNanos(0);
    insert.setString(1, "hello");
    insert.setTimeStamp(2, timeStamp);
    insert.executeUpdate();That's all. You never need to mess about with formatting timestamps in the way your database needs them, the PreparedStatement takes care of all that for you.

  • Need help for SRM Data Extraction into BI-7

    Hi Experts,
    I am looking for help regarding SRM DataSource Extraction to BW. I am working on BW project and need to extract data from SRM Data Source 0BBP_TD_CONTR_2 and 0SRM_TD_PRO. I need to know about the extraction process from SRM. Is there a tool available like LO Cockpit in SRM for extraction and how can we manage the delta in it. Or i can use the T-code RSA5 for that and follow the normal process. If I can get some documentation that can give me an idea for data extraction and delta management in SRM that would be appreciated. Any kind of help will be welcome.
    Thanks in Advance.

    SRM doesn't use kind of "cockpit" LO-like in ECC.
    Overall picture:
    http://help.sap.com/saphelp_srm40/helpdata/en/b3/cb7b401c976d1de10000000a1550b0/content.htm
    If you setup data flows accordign Business Content of SRM:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/3a/7aeb3cad744026e10000000a11405a/frameset.htm
    Then just perform an init load and schedule the deltas.

  • Need help ASAP with Data Flow Task Flat File Connection

    Hey there,
    I have a Data Flow Task within a ForEach loop container.  The source of the flow is ADO.NET connection and the destination is a Flat File Connection.  I loop through a collection of strings in the ForEach loop.  Based on the string content,
    I write some data to the same destination file in each iteration overwriting the previous version. 
    I am running into following Errors:
    [Flat File Destination [38]] Warning: The process cannot access the file because it is being used by another process.
    [Flat File Destination [38]] Error: Cannot open the datafile "Example.csv".
    [SSIS.Pipeline] Error: Flat File Destination failed the pre-execute phase and returned error code 0xC020200E.
    I know what's happening but I don't know how to fix it.  The first time through the ForEach loop, the destination file is updated.  The second time is when this error pops up.  I think it's because the first iteration is not closing the destination
    file. How do I force a close of the file within Data Flow task or through a subsequent Script Task.
    This works within a SQL 2008 package on one server but not within SQL 2012 package on a different server.
    Any help is greatly appreciated.
    Thanks! 

    Thanks for the response Narsimha.  What do you mean by FELC? 
    First time poster - what is the best way to show the package here?

  • Need help in writing data to a flat file in .csv format

    Hi All,
    could you please show with a sample example to write data in .csv format using UTL_file.
    The result of the refcursor i want to write to a file in .csv format.
    How can i achieve this.
    Thx

    Hi,
    There are two ways to acheive this.
    First and which I prefer is creating a SQL script which will generate csv file at the specified location in CSV format. And then this SQL script can be called from your cron job similar to how you call stored procedure. Following is pseudo code that can be used -
    set linesize 500
    set echo off
    set feedback off
    set prompt off
    set pagesize 0
    spool <name of the csv file>.csv
    <Your select statement>;
    spool offPut select statement delimiting columns you want to use with ','. E.g. following query should create a CSV file named as abc.csv with one record and 2 columns delimited by comma. First column is ENO and second column is ENAME.
    set linesize 500
    set echo off
    set feedback off
    set prompt off
    set pagesize 0
    spool abc.csv
    select ENO || ',' || ENAME from employee;
    spool offSecond, you can write a PLSQL procedure and then call this procedure from cron job. There is a generic procedure shared by BluShadow some time back which is a very good example for this. Please refer to following link for this solution -
    REF Cursor creating CSV files
    I will suggest to use first method above if possible since it will be faster and less complicated in my opinion. Second method is recommended for scenarios where select statement is created dynamically and cannot be written during development.
    Hope this solves your purpose.
    Cheers,
    Anirudha

  • I need help proving the date tag on a photo stored in my iPhoto is from the date it was sent to my iphone/date it was imported into iphoto - and that it is NOT the date the photo was actually taken.  Please help!

    I need help proving the date tag on a photo stored in my iPhoto is from the date it was sent to my iphone/date it was imported into iphoto - and that it is NOT the date the photo was actually taken.   I recieved a photo via text on my iphone and then I synced my iphone to my macbook and now it is in iphoto.  I already know that the date on the photo per the tag that shows up on it in iphoto is NOT the date the photo was actually taken.  I need article or literature or something confirming the tag is from when it was sent to the iphone and/or when it was imported.  I greatly appreciate some assistance!

    All I am trying to do is find something on a forum board or article etc stating that the the date showing in iphoto could be the date it was imported or synced or sent to me and not the actual date taken.
    The date on the photo could be anything because you can edit the date with iPhoto or any of 100 apps, free and paid for. So, the date on the photo will prove nothing, I'm afraid.
    Regards
    TD

  • How to pass a date parameter(from a procedure IN) to a API

    Hi,
    CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
    procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
    p_business_group_id_enter in number,p_change_date in varchar2) is
    CURSOR STAFF IS
    SELECT pp.ASSIGNMENT_ID
    ,peo.EMPLOYEE_NUMBER employee_no
    ,pp.OBJECT_VERSION_NUMBER
    ,pp.PAY_PROPOSAL_ID
    ,pp.PROPOSED_SALARY_N basic_salary
    ,pp.PROPOSAL_REASON
    ,pp.change_date
    ,pp.BUSINESS_GROUP_ID
    ,pg.name
    ,pr.PERFORMANCE_RATING,
    '' v_effective_start_date,
    '' v_effective_end_date
    FROM per_all_people_f peo,
    per_all_assignments_f pa,
    per_pay_proposals pp,
    per_grades_tl pg,
    per_performance_reviews_v pr
    where pa.person_id = peo.PERSON_ID
    and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
    and peo.PERSON_ID=pr.PERSON_ID
    and pg.GRADE_ID=pa.GRADE_ID
    --and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
    and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
    and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
    and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
    and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
    where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
    --L_BUSINESS_GROUP_ID NUMBER:=5128;
    L_ASSIGNMENT_ID NUMBER;
    L_PAY_PROPOSAL_ID NUMBER;
    L_OBJECT_VERSION_NUMBER NUMBER;
    L_pyp_proposed_sal_warning BOOLEAN;
    L_additional_comp_warning boolean;
    l_person_id number;
    L_COMMON boolean;
    L_ELEMENT_ENTRY_ID NUMBER;
    TEMP NUMBER;
    L_EFFECTIVE_START_DATE DATE;
    L_MULTI VARCHAR2(30):='N';
    L_APPROVED VARCHAR2(30):='Y';
    L_CHANGE_DATE DATE:=TO_DATE('31-JAN-2008','DD-MON-YYYY');
    BEGIN
    v_disp_output:='EMPLOYEE_NUMBER'||','||
    'BASIC'||','||
    'EFF START DATE'||','||
    'EFF END DATE';
    fnd_file.put_line(FND_FILE.output,v_disp_output);
    FOR STAFF_VAR IN STAFF LOOP
    L_ELEMENT_ENTRY_ID:=null;
    begin
    select assign.assignment_id,assign.effective_start_date into
    l_assignment_id,l_change_date_new
    from per_people_f peo,per_assignments_f assign
    where peo.person_id=assign.person_id
    and sysdate between peo.effective_start_date and peo.effective_end_date
    and sysdate between assign.effective_start_date and assign.effective_end_date
    and current_employee_flag='Y'
    and primary_flag='Y'
    and peo.business_group_id=l_business_group_id
    and peo.employee_number=staff_var.employee_no;
    L_CHANGE_DATE_new:=L_CHANGE_DATE;
    --L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
    begin
    HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
    P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
    ,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
    ,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
    ,P_CHANGE_DATE=>L_CHANGE_DATE_new
    ,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
    ,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
    ,p_multiple_components=>L_MULTI
    ,p_approved=>L_APPROVED
    ,P_VALIDATE=>false
    ,p_element_entry_id =>L_ELEMENT_ENTRY_ID
    ,P_INV_NEXT_SAL_DATE_WARNING=>l_common
    ,P_PROPOSED_SALARY_WARNING=>L_COMMON
    ,P_APPROVED_WARNING=>L_COMMON
    ,P_PAYROLL_WARNING=>L_COMMON
    in the above code the variable L_CHANGE_DATE DATE is hard coded .
    but we need to supply this variable value as dynamic, means (p_change date--procedure IN Parameter )
    i tried like below ,
    CREATE OR REPLACE package body xxal_basic_sal_increment_pkg1 as
    procedure emp_pro_inc1(ERRBUF VARCHAR2,RETCODE OUT NUMBER,
    p_business_group_id_enter in number,p_change_date in varchar2) is
    CURSOR STAFF IS
    SELECT pp.ASSIGNMENT_ID
    ,peo.EMPLOYEE_NUMBER employee_no
    ,pp.OBJECT_VERSION_NUMBER
    ,pp.PAY_PROPOSAL_ID
    ,pp.PROPOSED_SALARY_N basic_salary
    ,pp.PROPOSAL_REASON
    ,pp.change_date
    ,pp.BUSINESS_GROUP_ID
    ,pg.name
    ,pr.PERFORMANCE_RATING,
    '' v_effective_start_date,
    '' v_effective_end_date
    FROM per_all_people_f peo,
    per_all_assignments_f pa,
    per_pay_proposals pp,
    per_grades_tl pg,
    per_performance_reviews_v pr
    where pa.person_id = peo.PERSON_ID
    and pa.ASSIGNMENT_ID = pp.ASSIGNMENT_ID
    and peo.PERSON_ID=pr.PERSON_ID
    and pg.GRADE_ID=pa.GRADE_ID
    --and peo.EMPLOYEE_NUMBER=STAFF_VAR.employee_no
    and sysdate between peo.EFFECTIVE_START_DATE and peo.EFFECTIVE_END_DATE
    and sysdate between pa.EFFECTIVE_START_DATE and pa.EFFECTIVE_END_DATE
    and peo.BUSINESS_GROUP_ID = p_business_group_id_enter
    and pp.change_DATE = (select max(change_DATE) from per_pay_proposals temp
    where ASSIGNMENT_ID =pp.ASSIGNMENT_ID);
    --L_BUSINESS_GROUP_ID NUMBER:=5128;
    L_ASSIGNMENT_ID NUMBER;
    L_PAY_PROPOSAL_ID NUMBER;
    L_OBJECT_VERSION_NUMBER NUMBER;
    L_pyp_proposed_sal_warning BOOLEAN;
    L_additional_comp_warning boolean;
    l_person_id number;
    L_COMMON boolean;
    L_ELEMENT_ENTRY_ID NUMBER;
    TEMP NUMBER;
    L_EFFECTIVE_START_DATE DATE;
    L_MULTI VARCHAR2(30):='N';
    L_APPROVED VARCHAR2(30):='Y';
    L_CHANGE_DATE DATE:=TO_DATE(p_change_date,'DD-MON-YYYY');
    BEGIN
    v_disp_output:='EMPLOYEE_NUMBER'||','||
    'BASIC'||','||
    'EFF START DATE'||','||
    'EFF END DATE';
    fnd_file.put_line(FND_FILE.output,v_disp_output);
    FOR STAFF_VAR IN STAFF LOOP
    L_ELEMENT_ENTRY_ID:=null;
    begin
    select assign.assignment_id,assign.effective_start_date into
    l_assignment_id,l_change_date_new
    from per_people_f peo,per_assignments_f assign
    where peo.person_id=assign.person_id
    and sysdate between peo.effective_start_date and peo.effective_end_date
    and sysdate between assign.effective_start_date and assign.effective_end_date
    and current_employee_flag='Y'
    and primary_flag='Y'
    and peo.business_group_id=l_business_group_id
    and peo.employee_number=staff_var.employee_no;
    L_CHANGE_DATE_new:=L_CHANGE_DATE;
    --L_CHANGE_DATE_new:=STAFF_VAR.v_effective_start_date;
    begin
    HR_MAINTAIN_PROPOSAL_API.INSERT_SALARY_PROPOSAL
    P_PAY_PROPOSAL_ID=>L_PAY_PROPOSAL_ID
    ,P_ASSIGNMENT_ID=>staff_var.ASSIGNMENT_ID
    ,P_BUSINESS_GROUP_ID=>staff_var.BUSINESS_GROUP_ID
    ,P_CHANGE_DATE=>L_CHANGE_DATE_new
    ,P_PROPOSED_SALARY_N=>STAFF_VAR.basic_salary
    ,P_OBJECT_VERSION_NUMBER=>STAFF_VAR.OBJECT_VERSION_NUMBER
    ,p_multiple_components=>L_MULTI
    ,p_approved=>L_APPROVED
    ,P_VALIDATE=>false
    ,p_element_entry_id =>L_ELEMENT_ENTRY_ID
    ,P_INV_NEXT_SAL_DATE_WARNING=>l_common
    ,P_PROPOSED_SALARY_WARNING=>L_COMMON
    ,P_APPROVED_WARNING=>L_COMMON
    ,P_PAYROLL_WARNING=>L_COMMON
    but we are getting the error Cause: FDPSTP failed due to ORA-01839: date not valid for month specified
    ORA-06512: at "APPS.XXAL_BASIC_SAL_INCREMENT_PKG1", line 45
    ORA-06512: at line 1
    we tried the solution available in the metalink still its giving error ..
    pl help us to solve this issue ...
    how should we pass the date parameter while we run the concurrent program(we used date value set).
    also we tried with some other value set also ..
    Regards,
    kumar

    dear,
    I have the following code to create proposal, but the API create salary proposal for all record s and does not create entry for all records it just creates for the first record
    any advice
    the code ....
    /* Formatted on 2007/08/29 16:20 (Formatter Plus v4.8.8) */
    ----------------------- P R O P O S A L -------------------------
    DECLARE
    l_rows_processed NUMBER := 0;
    l_commit_point NUMBER := 500;
    l_business_group_id NUMBER
    := fnd_profile.VALUE ('PER_BUSINESS_GROUP_ID');
    l_proposal_salry NUMBER;
    l_approved CHAR (1);
    l_rowid VARCHAR2 (30);
    l_errmessage VARCHAR2 (400);
    l_entry_indecator NUMBER;
    l_assignment_id NUMBER;
    p_ctr_object_version_number NUMBER;
    -- Out Parameters --
    l_element_entry_id NUMBER;
    p_element_entry_id NUMBER;
    l_ctr_object_version_number NUMBER;
    l_pay_proposal_id NUMBER;
    l_inv_next_sal_date_warning BOOLEAN;
    l_proposed_salary_warning BOOLEAN;
    l_approved_warning BOOLEAN;
    l_payroll_warning BOOLEAN;
    CURSOR crs_dc_mn
    IS
    SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
    xdp.proposal_reason, xdp.proposed_salary,
    xdp.assignment_number, xdp.employee_number, xdp.person_id,
    xdp.new_asg_id
    FROM apps.xx_dc_proposal xdp
    WHERE xdp.assignment_id <> -1
    AND xdp.processed = 'N'
    AND xdp.change_date =
    (SELECT MIN (xdc.change_date)
    FROM xx_dc_proposal xdc
    WHERE xdc.assignment_id = xdp.assignment_id
    AND xdc.processed = 'N')
    ORDER BY assignment_id, change_date ASC;
    pro_rcrd crs_dc_mn%ROWTYPE;
    CURSOR crs_dc_proposal1 (p_asg_id IN NUMBER)
    IS
    SELECT xdp.ROWID, xdp.assignment_id, xdp.change_date,
    xdp.proposal_reason, xdp.proposed_salary,
    xdp.assignment_number, xdp.employee_number, xdp.person_id,
    xdp.new_asg_id
    FROM apps.xx_dc_proposal xdp
    WHERE xdp.assignment_id <> -1
    AND xdp.processed = 'N'
    AND xdp.assignment_id = p_asg_id
    ORDER BY assignment_id, change_date ASC;
    BEGIN
    OPEN crs_dc_mn;
    FETCH crs_dc_mn
    INTO pro_rcrd;
    LOOP
    BEGIN
    hr_maintain_proposal_api.insert_salary_proposal
    (p_pay_proposal_id => l_pay_proposal_id,
    p_assignment_id => pro_rcrd.assignment_id,
    p_business_group_id => l_business_group_id,
    p_change_date => pro_rcrd.change_date,
    p_comments => NULL,
    p_next_sal_review_date => NULL,
    p_proposal_reason => NULL,
    p_proposed_salary_n => pro_rcrd.proposed_salary,
    p_forced_ranking => NULL,
    p_performance_review_id => NULL,
    p_attribute_category => NULL,
    p_attribute1 => NULL,
    p_attribute2 => NULL,
    p_attribute3 => NULL,
    p_attribute4 => NULL,
    p_attribute5 => NULL,
    p_attribute6 => NULL,
    p_attribute7 => NULL,
    p_attribute8 => NULL,
    p_attribute9 => NULL,
    p_attribute10 => NULL,
    p_attribute11 => NULL,
    p_attribute12 => NULL,
    p_attribute13 => NULL,
    p_attribute14 => NULL,
    p_attribute15 => NULL,
    p_attribute16 => NULL,
    p_attribute17 => NULL,
    p_attribute18 => NULL,
    p_attribute19 => NULL,
    p_attribute20 => NULL,
    p_object_version_number => l_ctr_object_version_number,
    p_multiple_components => 'N', -- 918219
    p_approved => 'Y',
    p_validate => FALSE,
    p_element_entry_id => l_element_entry_id,
    p_inv_next_sal_date_warning => l_inv_next_sal_date_warning,
    p_proposed_salary_warning => l_proposed_salary_warning,
    p_approved_warning => l_approved_warning,
    p_payroll_warning => l_payroll_warning
    UPDATE xx_dc_proposal
    SET processed = 'Y'
    WHERE ROWID = pro_rcrd.ROWID;
    l_rows_processed := l_rows_processed + 1;
    IF l_rows_processed = l_commit_point
    THEN
    COMMIT;
    l_rows_processed := 0;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_errmessage := SQLERRM;
    UPDATE xx_dc_proposal
    SET err_message = l_errmessage
    WHERE ROWID = pro_rcrd.ROWID;
    END;
    END LOOP;
    CLOSE crs_dc_mn;
    COMMIT;
    END;
    ..............................

  • Pass a date parameter to Stored Procedure

    Hello friends,
    Can you help to pass a date parameter to Stored procedure from JSP. This is my code:
    In Oracle 9i I have this:
    PROCEDURE SP_EDORES(
    pfechaini IN hist_pol_reclama.hrc_fecha_contabilidad%Type, <-- This is a date field
    pfechafin IN hist_pol_reclama.hrc_fecha_contabilidad%Type, <-- This is a date field
    p_recordset OUT PKG_REP_CIERRE.cursor_type) AS
    In JSP have this:
    CallableStatement stmt = (CallableStatement)conn.prepareCall( "begin PKG_REP_CIERRE.SP_EDORES(?,?,?); end;" );
    stmt.registerOutParameter(3,oracle.jdbc.driver.OracleTypes.CURSOR);
    stmt.setDate(1,Date.valueOf("01-06-2005"));
    stmt.setDate(2,Date.valueOf("30-06-2005"));
    ResultSet rset = (ResultSet)stmt.getObject(3);
    while (rset.next()) {
    %>
    <TR>
    <TD ALIGN=CENTER> <%= rset.getString(1) %> </TD>
    <TD ALIGN=CENTER> <%= rset.getString(2) %> </TD>
    <TD ALIGN=CENTER> <%= rset.getString(3) %> </TD>
    <TD ALIGN=CENTER> <%= rset.getInt(4) %> </TD>
    </TR>
    <%
    The Stored Procedure returns de Result set, however I think does not recognized the date format because I need it with this format dd-mm-yyyy.
    Thanks in advance

    to use Date you will need the oracle package.
    u can try this other solution: use String, not Date
    CallableStatement stmt = (CallableStatement)conn.prepareCall( "begin PKG_REP_CIERRE.SP_EDORES(?,?,?); end;" );
    stmt.registerOutParameter(3,oracle.jdbc.driver.OracleTypes.CURSOR);
    stmt.setString(1,"01-06-2005");
    stmt.setString(2,"30-06-2005");
    ResultSet rset = (ResultSet)stmt.getObject(3);
    while (rset.next()) {
    %>
    if this don't work you can change your PL/SQL to get Strings and do the conversion with TO_DATE in the sql statement.

  • How to pass in a parameter into a report viewer on a jsp - and hidden

    Hi, I've built a php application and am using the java environment to enable the crystal report/viewer.  The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
    <%@ page contentType="text/html; charset=UTF-8"
       pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
    <%
    // just a test to grab rpt name from GET
    String rptFile = "report_files/" + request.getParameter("rpt");
    %>
    <crviewer:viewer reportSourceType="reportingComponent" viewerName=""
    isOwnPage="true">
       <crviewer:report reportName="<%= rptFile %>" />
    </crviewer:viewer>
    Many thanks in advance!
    Mark

    I am not aware of any html tags you can pass to the viewer for parameter values.  Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.

  • 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 pass a date parameter from report builder query designer to oracle database

    i'm using report builder 3.0 connected to oracle database. i'm trying to pass a date parameter in the query with no success, i don't
    know the exact syntax. I've tried :
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date('01/01/2014','mm/dd/yyyy')
    it worked perfectly.
    However if i try to put a date parameter "From" instead of 01/01/2014 it will not work, a Define Query Parameter popup window appear and error occurred after i fill
    the values (usually i shouldnt get this popup i should enter the value when i run the report)
    SELECT * FROM igeneral.GCL_CLAIMS where CREATED_BY IN (:CREATED_BY) AND CLAIM_YEAR IN(:UW_YEAR) AND (LOSS_DATE) >To_Date(:From,'mm/dd/yyyy')
    appreciate your assistance

    Hi Gorgo,
    According to your description, you have problem when in passing a parameter for running a Oracle Query. Right?
    Based on my knowledge, it use "&" as synax for parameter in Oracle, like we use "@" in SQL Server. In this scenario, maybe you can try '01/01/2014' when inputing in "From". We are not sure if there's any limitation for To_Date()
    function. For your self-testing, you can try the query in sqlplus/sql delveloper. Since your issue is related to Oracle query, we suggest you post this thread onto Oracle forum.
    Best Regards,
    Simon Hou

  • Need help in transfering data to my new iphone4 from my old iphone3

    Hello, just received my new iphone 4, need help in transfering data from my old iphone 3 photos, emails etc. apps, thank you

    http://support.apple.com/kb/ht2109

  • Need help in oracle data recovery

    Friends ,i need help in oracle data recovery.
    I had an oracle 8i database running on windows.
    For some reason Windows operating system crashed.
    It is not booting up.
    I dont have current backups.But my database physical files are in the disk.
    Controlfile,datafiles and redo log files are there.
    Is there any way I can recover my database?
    Please help in this issue.
    regards
    Ajith

    HI citrus,
    thanks for the reply.
    I have installed database 9i on the same PC after O/S reinstallation.
    You are saying that ,I need to keep oracle root folder same as that of my old installation ,and copy control files,redo log and data files in exactly same folders as that of old database,and then start the database?
    thank you for your patience and support.
    regards.,
    Ajith

  • In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String

    In JDBC Sender Adapter , the server is Microsoft SQL .I need to pass current date as the input column while Executing stored procedure, which will get me 10 Output Columns. Kindly suggest me the SQL Query String , for executing the Stored Procedure with Current date as the input .

    Hi Srinath,
    The below blog might be useful
    http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/06/executing-stored-procedure-from-sender-adapter-in-sap-pi-71
    PI/XI: Sender JDBC adapter for Oracle stored procedures in 5 days
    regards,
    Harish

Maybe you are looking for

  • BAPI for Sales Order Creation.

    Hello gurus, I want to create a sales order using BAPI. I have tried some BAPI's like BAPI_SALESORDER_CREATEFROMDAT1, BAPI_SALESORDER_CREATEFROMDAT2, BAPI_SALESORDER_CREATEFROMDATA, BAPI_SALESDOCU_CREATEWITHDIA. But I am not able to update the Miscel

  • Problem in applying startup script

    In a domain with a windows 2008 R2 domain controller, windows 7 computers apply the startup script but windows xp sp3 boxes show this log in event log:  Source: UserInit Event ID: 1000 Could note execute the following script \\192.168.1.4\scripts\pin

  • Not such file or directory, icloud garageband

    hello, i just got in a very disappointing trouble using garageband, i uploaded songs to icloud and the i donloaded them again and edited them, everything was ok, till one day , i wanted to download one of my song from icloud but when i tapped on the

  • Flash 8 crashes when publishing (Mac 10.3.9)

    I've searched the forums and haven't found an instance that is relevant enough to my situation. Pretty basic, really. I have a registered version of Flash and I go to publish. Not doing anything crazy with the publish settings. The document I'm worki

  • InDesign Cs5.5 Scrollbar, palettes, and toolbar buttons locked up (but not all)

    Can anyone help me?? I have InDesign as part of Cs5.5. My scrolbars, palettes, and many toolbar buttons aren't working. I can't select the Selection tool, text wrap options, or put color to shapes as just some examples. I have looked all over the for