Job and Sysdate

Dears,
I have procedure proc_name and I have to call it with the parameter sysdate.
When I do sql>exec proc_name(sysdate); it works well. But I need to call it repeatedly.
I created a job, where the procedure has the parameter 'sysdate'.
The script for my job looks like:
BEGIN
number_of_arguments => 1,
sys.dbms_scheduler.set_job_argument_value( job_name => '"HR"."XXX"', argument_position => 1, argument_value => 'sysdate');
END
But the job has error:
ORA-01858: a non-numeric character was found where a numeric was expected
Could you help me, what the Problem can be?
Thanks

01858, 00000, "a non-numeric character was found where a numeric was expected"
// *Cause: The input data to be converted using a date format model was
// incorrect. The input data did not contain a number where a number was
// required by the format model.
// *Action:  Fix the input data or the date format model to make sure the
// elements match in number and type. Then retry the operation.
i got the same error and didn't find a solution.
But why do you use sysdate as a parameter and not in the procedure:
e.g.
create table test (day date, day2 varchar2(30))
CREATE OR REPLACE PROCEDURE TEST1
as
begin
insert into test (day,day2) values (sysdate,to_char(sysdate,'DD-MM-YY HH24:MI:SS'));
commit;
end;
BEGIN
sys.dbms_scheduler.create_job(
job_name => '"SYS"."TEST1"',
job_type => 'STORED_PROCEDURE',
job_action => 'HR.TEST1',
repeat_interval => 'FREQ=MINUTELY;INTERVAL=5',
start_date => systimestamp at time zone 'Europe/Berlin',
job_class => 'DEFAULT_JOB_CLASS',
auto_drop => FALSE,
enabled => TRUE);
END;
my be you'll find an answer in the SQL/PL-SQL Forum

Similar Messages

  • Creating a job and scheduling a job error in OEM

    Hi, Everyone,
    I am trying to create and schedule a job thru OEM. In the the pl/sql block provide i have given my code like this
    begin
    SET SERVEROUTPUT ON;
    SPOOL C:\RFV_PROFILE_REPORT.LOG APPEND;
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL;
    EXEC PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL;
    SPOOL OFF;
    end;
    i have created the job and scheduled it but i am getting this error:
    Error # 6550
    Details ORA-06550: line 2, column 5: PL/SQL: ORA-00922: missing or invalid option ORA-06550: line 2, column 1: PL/SQL: SQL Statement ignored ORA-06550: line 3, column 7: PLS-00103: Encountered the symbol "C" when expecting one of the following: := . ( @ % ;
    could anyone pls help as this is very urgent.
    Thanks in advance

    Ah, the problem is you are confusing SQLPlus commands with PL/SQL.
    SET SERVEROUTPUT ON; -- This is a SQLPlus command, not necessary here.
    SPOOL C:\RFV_PROFILE_REPORT.LOG APPEND; -- This is a SQLPlus command, in PL/SQL to write out to a file you will need to call the UTL_FILE package to open a file for writing to. Except that the file you write to will appear on the database server, not your workstation, when the scheduled job runs.
    SELECT TO_CHAR(SYSDATE, 'DD/MM/YY HH24:MI:SS') FROM DUAL; -- In PL/SQL you need to SELECT columns INTO variables FROM tables. But in fact I guess you want to write the time to file using UTL_FILE again. However, you don't really need to do this, since scheduler will log the start time and run duration itself.
    EXEC PAC_RFV_PROFILE_REPORT.CALL_ALL (200910); -- This is the SQLPlus equivalent of the PL/SQL command:
    BEGIN
    PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    END;
    SPOOL OFF; -- This is a SQLPlus command, not necessary here.
    So to summarise, all you really need is:
    BEGIN
    PAC_RFV_PROFILE_REPORT.CALL_ALL (200910);
    END;
    And the scheduled job will log the start time and duration in the database, which you can find here:
    SELECT * FROM USER_SCHEDULER_JOB_RUN_DETAILS

  • Any idea while updating job and position --I am getting the following error

    Hi, I am trying to update job and position to the existing employee but getting the following error
    Error report:
    ORA-20001: The primary key specified is invalid
    Cause: The primary key values specified are invalid and do not exist in the schema.
    Action: Check the primary key values before attempting to carry out the operation again.
    ORA-06512: at "APPS.HR_ASSIGNMENT_API", line 16616
    ORA-06512: at line 35
    Code which I am using is as below
    declare
    l_assignment_id number;
    l_object_version_number number;
    l_special_ceiling_step_id number;
    LC_EFFECTIVE_END_DATE DATE;
    LC_EFFECTIVE_START_DATE DATE;
    LC_DATETRACK_UPDATE_MODE VARCHAR2(100);
    LC_GROUP_NAME VARCHAR2(1000);
    LC_CONCATENATED_SEGMENTS VARCHAR2(1000);
    L_ENTRIES_CHANGED_WARNING VARCHAR2(1000);
    LC_GSP_POST_PROCESS_WARNING VARCHAR2(1000):=NULL;
    LC_PEOPLE_GROUP_ID NUMBER:=NULL;
    LC_OBJECT_VERSION_NUMBER NUMBER:=NULL;
    LC_SOFT_CODING_KEYFLEX_ID NUMBER:=NULL;
    LC_SPECIAL_CEILING_STEP_ID NUMBER:=NULL;
    LC_GRADE_ID NUMBER:=NULL;
    LC_OTHER_MANAGER_WARNING BOOLEAN:=NULL;
    LC_SPP_DELETE_WARNING BOOLEAN:=NULL;
    LC_ORG_NOW_NO_MANAGER_WARNING BOOLEAN:=NULL;
    LCTAX_DISTRICT_CHANGED_WARNING BOOLEAN:=NULL;
    L_EMP_START_DATE DATE:=NULL;
    J_LOCATION_ID NUMBER;
    J_PAY_BASIS_ID NUMBER;
    J_SEGMENT5 number;
    J_SEGMENT3 number;
    J_SEGMENT2 number;
    J_GRADE_ID number;
    J_PAYROLL_ID number;
    begin
    l_assignment_id := 214;
    hr_assignment_api.update_emp_asg_criteria
    P_VALIDATE => FALSE
    ,P_EFFECTIVE_DATE => TRUNC(sysdate)
    ,P_DATETRACK_UPDATE_MODE => LC_DATETRACK_UPDATE_MODE
    ,P_ASSIGNMENT_ID => l_assignment_id
    ,P_GRADE_ID => J_GRADE_ID
    ,P_POSITION_ID => 5062
    ,P_JOB_ID => 3063
    ,P_PAYROLL_ID => J_PAYROLL_ID
    ,P_LOCATION_ID => 142--J_LOCATION_ID
    ,P_ORGANIZATION_ID => 81
    ,P_PAY_BASIS_ID => J_PAY_BASIS_ID
    ,p_segment5 => J_SEGMENT5
    ,p_segment2 => J_SEGMENT2
    ,p_segment3 => J_SEGMENT3
    ,P_OBJECT_VERSION_NUMBER => LC_OBJECT_VERSION_NUMBER
    ,P_SPECIAL_CEILING_STEP_ID => LC_SPECIAL_CEILING_STEP_ID
    ,P_PEOPLE_GROUP_ID => LC_PEOPLE_GROUP_ID
    ,P_SOFT_CODING_KEYFLEX_ID => LC_SOFT_CODING_KEYFLEX_ID
    ,P_GROUP_NAME => LC_GROUP_NAME
    ,P_EFFECTIVE_START_DATE => LC_EFFECTIVE_START_DATE
    ,P_EFFECTIVE_END_DATE => LC_EFFECTIVE_END_DATE
    ,P_ORG_NOW_NO_MANAGER_WARNING => LC_ORG_NOW_NO_MANAGER_WARNING
    ,P_OTHER_MANAGER_WARNING => LC_OTHER_MANAGER_WARNING
    ,P_SPP_DELETE_WARNING => LC_SPP_DELETE_WARNING
    ,P_ENTRIES_CHANGED_WARNING => L_ENTRIES_CHANGED_WARNING
    ,P_TAX_DISTRICT_CHANGED_WARNING => LCTAX_DISTRICT_CHANGED_WARNING
    ,P_CONCATENATED_SEGMENTS => LC_CONCATENATED_SEGMENTS
    ,P_GSP_POST_PROCESS_WARNING => LC_GSP_POST_PROCESS_WARNING);
    end;
    Thanks in advance
    Rajini

    Please post the details of the application release, database version and OS.
    What HRMS patchset you are on?
    Please see if these docs help.
    Getting "ORA-20001: The primary key specified is invalid" Error Using HR_ASSIGNMENT_API.UPDATE_EMP_ASG_CRITERIA API [ID 737145.1]
    Hr_assignment_api.Update_emp_asg_criteria Gives Ora-20001, Ora-06512 [ID 334491.1]
    Thanks,
    Hussein

  • Triggering Process chain based on execution of R3 job and Process Chain

    Hi All,
    I need your help in arriving at a solution for a reqirement.
    Scenario is., I need to trigger a process chain B based on successful execution of Process chain A and an R3 job. If both conditions(Completion of R3 job and Process Chain A) are met then only it has to trigger process Chain B.
    I know that we can use events to trigger a process chain using R3 job.But my case is differenet I need to consider the success message from both process chain and R3 job.Is there any way to solve it ?
    Please provide me with your valuable inputs.
    Thanks,
    Bindu

    Hi Hima,
    You can use the  'AND' variant for both, If both are success then trigger the process chain.
    Regards,
    Ravi Kanth
    Edited by: Ravi kanth on Apr 30, 2009 3:36 PM

  • I need to use Outlook Express to apply for jobs and I either don't have it but when I try to send an e-mail on Outlook Express, it won't go through and gives me an error report.....I really need to be able to use Outlook Express to apply for jobs. Help!

    When I try to apply for job and when I try to e-mail my resume' and Outlook Express comes up to reply to on, I put in my information, etc but when I hit send, it doesn't go through and says? POP and then error report and doesn't go through.

    I can't provide a solution with or without the error message, but without an error message, you are making everyone guess at what you see. I have no idea what you see, and I think someone who might be able to help you solve your problem would need to know what that message says. Is "Outlook Express" (Windows Live Mail) your default email processor, if not what is?

  • How can I get my old iTunes music onto my new computer without access to my old computer? I left my previous job and forgot to transfer my music. I bought iTunes match and it shows my old Mac as a device, but I cannot get the music off it.

    How can I get my old iTunes music onto my new computer without access to my old computer? I left my previous job and forgot to transfer my music. I bought iTunes match and it shows my old Mac as a device, but I cannot access any of the old music. All I can find are what was on my iPhone, but that's not what I want. I need all my old music from my old Mac, which has been wiped clean by IT at my old job. BUT, I did have iCloud at that time and I thought all my music would be accessible through it. I don't understand the Cloud! And I'm thinking spending $24.99 on iTunes Match was a waste of money because I still can't access my old music.

    When you are done with this issue, consider the computer back at the office may still
    have access to your iTunes account, and it should be de-auhorized. You can do that
    remotely, but be sure you carefully do not mess up your other computer iTunes libraries.
    Good luck & happy computing!

  • I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    I am doing two people's jobs and I need to use two separate log-ins on the same website. How can I keep both log-ins open at the same time. Everytime I switch tabs I have to log in again.

    Try one of these extensions for multiple cookie sessions.
    Multifox: <br />
    http://br.mozdev.org/multifox/ <br />
    Cookie Swap extension: <br />
    https://addons.mozilla.org/firefox/3255/ <br />
    Cookie Pie extension: <br />
    http://www.nektra.com/oss/firefox/extensions/cookiepie/

  • Run the Report as a Background job and Get the Output in Excel in Local PC

    Hello Gurus,
    I have one following requirement.
    One should be able to run the report as a background job and it should be possible to get the report in Excel format, also when running the report in background. The excel report should have the same information and look as the current SAPreport.
    Please provide some solution.
    Any helpful answer get surely awarded.
    Thanks a lot,
    Varlanir

    GUI_* WS_* Function In Background, CSV Upload
    GUI_* and WS_* function modules do not work in background
    When scheduling a job in the background the appropriate statement to read in your file is OPEN DATASET, and the file must be on the file system that the SAP server can see.
    At anytime, a user can switch of the Personal Computers even though the job is still running in the background.  Therefore GUI_* and WS_* function modules are not designed to work in that way, as they need to access your personal computer  file.
    To choose the correct download method to used, you can check the value of SY-BATCH in your code,
    if it is 'X' use OPEN DATASET and if it is ' ' use WS_UPLOAD.
    *-- Open dataset for reading
    DATA:
      dsn(20) VALUE '/usr/test.dat',
      rec(80).
    OPEN DATASET dsn FOR INPUT IN TEXT MODE.
    IF sy-subrc = 0.
      DO.
        READ DATASET dsn INTO rec.
        IF sy-subrc <> 0.
          EXIT.
        ELSE.
          WRITE / rec.
        ENDIF.
      ENDDO.
    ENDIF.
    CLOSE DATASET dsn.
    *-- Open dataset for writing
    DATA rec(80).
    OPEN DATASET dsn FOR OUTPUT IN TEXT MODE.
      TRANSFER rec TO '/usr/test.dat'.
    CLOSE DATASET dsn.
    What is the difference when we use upload, ws_upload, gui_upload function modules?
    UPLOAD, WS_UPLOAD, GUI_UPLOAD, are used in BDC concepts.  ie., Batch Data Communication.
    Batch Data Conversion is a concept where user can transfer the Data from non SAP to SAP R/3.  So , in these various Function Modules are used.
    UPLOAD---  upload a file to the presentation server (PC)
    WS_UPLOAD----    Load Files from the Presentation Server to Internal ABAP Tables.
    WS means Work Station.
    This is used upto SAP 4.6 version.
    GUI_UPLOAD-------    Replaces WS_UPLOAD. Upoad file from presentation server to the app server.  From 4.7 SAP version it is replaced.
    How to Upload csv file to SAP?
    Common File Download Upload Questions:
    How  you upload the data from text file to sap internal table?  From my knowledge its by upload or gui_upload. 
    How you download the data from sap internal table to text file?
    How  you upload the data from xls (excel) file to sap internal table how you download the data from sap internal table to xls(excel) file.
    You can upload data from presentation server to an internal table using gui_upload. Use gui_download to download from internal table to flat file.
    Use fm ALSM_EXCEL_TO_INTERNAL_TABLE to upload data frm excel.
    Use function module GUI_UPLOAD
    The FILETYPE refer to the type of file format you need: For e.g 'WK1' - Excel format , 'ASC' - Text Format etc.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = 'C:\test.csv'
       FILETYPE                      = 'ASC'
      TABLES
        DATA_TAB                      = itab
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17.

  • Can U set breakpoint within a batch job and look at variables?

    Hello friends,
    I am trying to solve a problem that occurs within a program / transaction which can only be executed in background. The transaction in question is FPCOPARA and apparently this program cannot be executed in foreground.
    If I understand well, we cannot set breakpoints within a background job and as a result we cannot inspect variable etc. during job execution. So the question is how to achieve the same goal within a batch job? How did you do it? As this is a standard SAP transacrtion, no program modification can be applied.
    Your help is greatly appreciated.

    Hi......
    After u have executed ur batch job..
    go to sm37 >>select ur job using checkbox>>enter 'JDBG' in transaction box and press enter
    now debugger will start ..initial it will go through system code..after after a while the debugger will reach to your code and den you can debug the remaining report....
    all the best
    regards
    vivek

  • Creating a new job and position prompts customizing request...

    Dear All,
            I created a Job and Position through PP01 transaction. I am facing 2 issues while doing so...
    1. System prompts for Customizing request when i try to save the new entry.
        What table/settings do i need to maintain for turning of the customizing request promptings.
    2. Once i save the entries(after entering some dummy customizing requests), when i check the
        HRP1000 table for the new jobs and positions... The table entry shows 2 records for each Job and     
        position. One entry with Plan version '.:' and another with active Plan version '1'.
        I need to have just one entry in HRP1000 table for each job/position with ACTIVE plan version.
       I checked T77S0 table, it has active plan version maintained against the PLOGI-PLOGI entry.
       Please let me know what table i need to maintain to handle my requirement.
    Regards
    Nanda

    Hi Nanda,
    When you create new job or position in sandbox system it will not ask for the request number,since you generally dont transport the objects from sandbox to test system.
    When you create a new job or position in development system, it will always ask for request number. This is because, in most of the cases, you need to transport the job and position to test system and then to production system.
    Without a customizing request  you wont be able to transport those changes to next system.
    Thanks,
    Supriya.

  • I changed jobs and purchased a new iPhone I  no longer have any of my iBook information. My Apple account and name has changed is there any way to get the info I had in iBooks to my new phone under my new account?

    I changed jobs and bought a new phone. I would like to get my iBooks info on my new phone but it is under my old account. When I try to log in under the old account i get a message that I will not be able to log back onto my new account for a period of time. HOw do i get the information from my old account over to my new account?

    You can't currently transfer purchases/downloads from one account to another account.
    When you download past purchases from an account then you will potentially tie the device (or computer if you do it on that) to that account for 90 days : http://support.apple.com/kb/HT4627
    Have you got the ibooks already on your computer and/or on a backup so that you can sync them to your new iPhone ? If not then have you bought anything on your new account yet - could you go back to just using the old account ?

  • I recently changed jobs and no longer have access to the computer that contained my Firefox bookmarks. I don't have a Firefox profile. Is there any way to find and transfer my bookmarks to my new computer?

    I recently changed jobs and no longer have access to the computer that contained my Firefox bookmarks. I don't have a Firefox profile. Is there any way to find and transfer my bookmarks to my new computer?

    If you don't have access to the old computer any longer, '''no'''. Unless you were using something like the Google Toolbar & Google Bookmarks or Xmarks, which would have your bookmarks in an online account that you could access. Firefox doesn't include an online storage feature for personal data, yet. That is coming in a future version.
    If you have a friend at your old job maybe they have access to that old PC and they could export your bookmarks to a file and email that file to you.

  • How to find out what are the interfaces used for Job and Job Codes

    HI All,
    I just wanted to know how do we find out what are the interfaces used for Job and Job codes .
    Thanks In Advance
    Sunny

    Hi,
    Here is an idea for your request.
    Basically you can create a simple query on multiprovider 0TCT_MC01.
    Filter: you can use a variable for restriction of time ( calday, or calmonth) since you should be interested for a time period.
    Choose following characters into your objects:
    InfoProvider ( 0TCTIFPROV )  - you can create a variable for choosing infoprovider before query runs.
    *Tp.[Type of BI Application Object] 0TCTBISOTYP  = filter this with 'QUERY' or whatever your need is.
    *BI Application Object 0TCTBISBOBJ,  ( this will give you the name of the queries)
    In key figures choose,  Count for BI Appl. (0TCTWTCOUNT).
    (number for query run)
    Create a condition , for top 20.
    Hope this helps.
    Derya

  • SQL Server Agent and Jobs and executing @EventData

    I have a SQL Server Agent Job and within it a Job Step which states "Execute Report Subscriptions" and a command which has...
    exec msdb.dbo.sp_start_job '6FF53AED-855F-43AB-9FB7-064062B8012E' --9:07 subscription
    GO
    WAITFOR DELAY '00:08';
    Now, I find within SQL Server Agent the Job  '6FF53AED-855F-43AB-9FB7-064062B8012E' and its step command which is...
    exec [ReportServer].dbo.AddEvent @EventType='TimedSubscription', @EventData='ca4e5410-2758-4a1a-9b06-513821e0d962'
    How can I drill-down further into the @EventData 'ca4e5410-2758-4a1a-9b06-513821e0d962' to see what it does? I do not see 'ca4e5410-2758-4a1a-9b06-513821e0d962' within SQL Server Agent and Jobs or am I way off base here as to what exactly the @EventData
    parameter seems to be?
    Thanks for your review and am hopeful for a reply.

    Hi ITBobbyP,
    According to your description, you need to know the what does SQL Server Reporting Services do when fire a subscription, right?
    When you create a subscription several things are added to the RS server
    A row is placed in the Subscriptions table identifying the name of the report, along with parameter settings, data driven query info and so on to process the subscription
    A row is placed in the Schedule and ReportSchedule tables with the timing of the subscription
    A SQL Server Agent job is created to control the scheduled execution of the report, and this is stored in the sysjobs and sysjobsteps of the MSDB database.
    When the subscription runs several things happen
    The SQL Server Agent job fires and puts a row in the Event table in the RS catalog with the settings necessary to process the subscription
    The RS server service has a limited number of threads (2 per CPU) that poll the Event table every few seconds looking for subscriptions to process
    When it finds an event, it puts a row in the Notifications table and starts processing the subscription
    Please refer to the links below to see the details.
    http://blogs.msdn.com/b/deanka/archive/2009/01/13/diagnosing-and-troubleshooting-subscriptions.aspx
    http://blogs.msdn.com/b/deanka/archive/2010/02/16/troubleshooting-subscriptions-part-ii-using-the-report-services-trace-log-file.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Hi i have 50 infoobjects as part of my aggregates and in that 10 infoobjects have received changes in masterdata.so in my process chain the Attribute change run in running for a long time.can i kill the job and repeat the same.

    Hi i have 50 infoobjects as part of my aggregates and in that 10 infoobjects have received changes in masterdata.so in my process chain the Attribute change run in running for a long time.can i kill the job and repeat the same.

    Hi,
    I believe this would be your Prod system, so don't just cancel it but look at the job log. If it is still processing then don't kill it and wait for the change run to complete but if you can see that nothing is happening and it is stuck for a long time then you can go ahead and cancel it.
    But please be sure, as these kind of jobs can create problems if you cancel them in the middle of a job.
    Regards,
    Arminder Singh

Maybe you are looking for