Error in plsql function

Hi Friends,
I have the below plsql function which is throwing error.
The below function is written in Apex, so kindly let me know ow to resolve this error
The below query checks the existing value and if null assigns a value by select statement. else will assign it back to the variable.
Function:
BEGIN
IF
:P1_VARIABLE_NAME IS NULL THEN :P1_VARIABLE_NAME:=select .... from .... (which returns a string value)
ELSE
:P1_VARIABLE_NAME
END
END
Error:
Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe

Pradeep wrote:
No I am creating a PLSQL function body option to write the above query. Is there a way in apex to dynamically bind the valueApex function bodies support bind variables. For example, you can set the rendering condition of an Apex region to a function body and code it as follows:
if :P1_SOMEVAR = MySchema.MyFunction( :P1_SOME_OTHERVAR ) then
  return( true );
else
  return( false );
end if;Where the bind variables used are standard Apex page item (variables).
I also suggest that if your questions are Apex related and not specifically PL/SQL and SQL language related, you rather ask your questions in the OTN Apex forum and not here.

Similar Messages

  • Error ERR-9131 Error in PLSQL function body for item default code, item=P24

    Hi All,
    Am getting the below error in my page 24
    ORA-01403: no data found
    Error ERR-9131 Error in PLSQL function body for item default code, item=P24_REQ_BY_ID
    OK
    I dont know what to do?:(
    Suddenly am getting this error in the page.
    Can anyone help me to understand why this error is coming?
    Thanks & Regards,
    Ramya
    Edited by: 901942 on Jan 29, 2012 10:16 PM

    Data stored in these tables is different. If Oracle says that there's no record that satisfies the WHERE condition, why do you think that it lies? It is too stupid to do that.
    Therefore, you need to handle the exception. There are several ways to do it. Here are some of them.
    The first one is the most obvious - EXCEPTION handling section.
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT ISID INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
        RETURN (null);  -- or whatever you find appropriate
    END;Another one is to use aggregate function (MAX is a good choice) as it won't return NO-DATA-FOUND, but NULL:
    DECLARE
      default_value VARCHAR2(100);
    BEGIN
      SELECT MAX(ISID) INTO default_value
        FROM USER_TBL
        WHERE UPPER(ISID) = UPPER(:APP_USER);
      RETURN default_value;
    END;

  • Error while trying to access a SSWA PLSQL function

    Hi,
    I am trying to access a report as a web page by defining the function as follows :
    Type : SSWA PLSQL FUNCTION
    HTML Call : OracleOASIS.RunReport
    Parameters : report=EMPDET
    This function is attached to the menu and when I try to access the page I get this error.
    "Error: The requested URL was not found, or cannot be served at this time.
    Incorrect usage."
    The URL that shows in the page is as follows(<server:port> I removed the server name and port) :
    http://<server:port>/dev60cgi/rwcgi60?GDEV_APPS+DESFORMAT=HTML+SERVER=GDEV_APPS+report=EMPDET+p_session_id=A9C71A70B9B1D9BD2DCC0FC3AF9BC324+p_user_id=1133+p_responsibility_id=50230+p_application_id=800+p_security_group_id=0+p_language_code=US+NLS_LANG=AMERICAN_AMERICA+NLS_DATE_FORMAT=DD-MON-RRRR+NLS_NUMERIC_CHARACTERS=.%2C+NLS_DATE_LANGUAGE=AMERICAN+NLS_SORT=BINARY+paramform=NO
    Surprisingly other functions which are defined in this manner work fine. Do I need to register my report anywhere or are there any other settings I need to do for the report to show up.
    Can someone let me know.
    Thanks

    Hi ;
    pelase check below which could be similar error like yours
    Troubleshooting of Runtime Errors of Customer Intelligence Reports [ID 284829.1]
    Regard
    Helios

  • Plsql function error in computation

    Hi Friends,
    I have the below plsql function which is throwing error.
    The below function is written in Apex, so kindly let me know how to resolve this error
    The below query checks the existing value and if null assigns a value by select statement. else will assign it back to the variable. I am not getting how to set the value dynamically using the select statement
    Function:
    BEGIN
    IF
    :P1_VARIABLE_NAME IS NULL THEN :P1_VARIABLE_NAME:=select .... from .... (which returns a string value)
    ELSE
    :P1_VARIABLE_NAME
    END
    END
    Error:
    Encountered the symbol "SELECT" when expecting one of the following: ( - + case mod new not null avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe

    Hi Kiran,
    I followed the query you mentioned and I am now getting the follwing below error:
    ORA-06550: line 7, column 3: PLS-00110: bind variable 'P1_VARIABLE_NAME' not allowed in this context ORA-06550: line 9, column 1: PLS-00103: Encountered the symbol "END" when expecting one of the following: ; The symbol ";" was substituted for "END" to continue.
    Note that I am using the PLSQL function block to fetch the data in the computation section of Apex.

  • How to register database plsql function in obiee

    Hi,
    I've a database plsql function which accepts two date arguments - StartDate and EndDate and return Integer.
    I discoverer like we've Plsql function registration tool, where we import function and pass parameter values as arguments in report- how same can be done in Oracle BI Administration tool and BI Answers?
    I tried to create logical column as
    EVALUATE('YOUR_FUNCTION(%1, %2, %3, %4)' as varchar(20),@{p_1},@{p_2},@{p_3},@{p_4})
    it is giving syntax error.
    url: How to store OBIEE presentation level variable values in DB
    Please help. It is really urgent.
    Kind Regards.

    Hi,
    I created 2 session variables p_startym and p_endym of char datatype and called in function(name: RepInitDates). It looks like:
    EVALUATE('INIT_DATES_MONID(%1, %2)' AS INTEGER , VALUEOF(NQ_SESSION."p_startym"), VALUEOF(NQ_SESSION."p_endym")).
    Now I've presentation variables StartMonth and EndMonth in bi answers report, whose value i want to pass to p_startym and p_endym. What should be the syntax of Bi answers column? Please reply.
    Thanks

  • Jobs gets hanged when a call is made to PLSQL function in Data Services XI

    Hi,
    I am facing the below issue after migration of BODI 11.7 to BODS XI 3.1.
    The job is not proceeding after the below mentioned statements.
    print('before call');
    $is_job_enable=DS_TEST.TEST.MY_PKG.IS_JOB_ENABLED(job_name());
    print($is_job_enable);
    MY_PKG.IS_JOB_ENABLED plsql function will return Number.
    $is_job_enable is a global variable declared as decimal (10, 0).
    This Job works fine in Data Integrator 11.7.3 version and gets handed in Data Services XI 3.1.
    I tried changing the global variable $is_job_enable to int and created new data sources before doesn't solve the problem. Can anyone tell me what is the issue?
    Thanks & Regards
    Maran MK
    The trace file says
    5260     3284     JOB     5/5/2009 4:43:17 AM     Job <TEST_JOB> is started.
    5260     3284     PRINTFN     5/5/2009 4:43:17 AM     before call
    5260     3284     SP     5/5/2009 4:43:18 AM     Stored procedure call <MY_PKG.IS_JOB_ENABLED> is started.
    5260     3284     SP     5/5/2009 4:43:18 AM     SQL query submitted for stored procedure call <MY_PKG.IS_JOB_ENABLED> is: <BEGIN :AL_SP_RETURN :=
    5260     3284     SP     5/5/2009 4:43:18 AM     "TEST"."MY_PKG"."IS_JOB_ENABLED"("P_JOB_NAME" => :P_JOB_NAME); END;
    5260     3284     SP     5/5/2009 4:43:18 AM     >.
    5260     3284     SP     5/5/2009 4:43:18 AM     Stored procedure call <E> input parameter <P> has value of <TEST_JOB>.
    5260     3284     SP     5/5/2009 4:43:18 AM     Stored procedure call <E> return value is <1.0000000>.
    5260     3284     SP     5/5/2009 4:43:18 AM     Stored procedure call <MY_PKG.IS_JOB_ENABLED> is done.
    The below error occurs only in Windows and not in Linux environment.
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     |Session TEST_JOB
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     System Exception <ACCESS_VIOLATION> occurred. Process dump is written to <E:\Program Files\Business Objects\Data
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Services\log\BODI_MINI20090505044318_5260.DMP> and <E:\Program Files\Business Objects\Data
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Services\log\BODI_FULL20090505044318_5260.DMP>
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Process dump is written to <E:\Program Files\Business Objects\Data Services\log\BODI_MINI20090505044318_5260.DMP> and
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     <E:\Program Files\Business Objects\Data Services\log\BODI_FULL20090505044318_5260.DMP>
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Call stack:
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00CA9EAB, ActaDecimalImpl<RWFixedDecimal<RWMultiPrecisionInt<3> >,RWMultiPrecisionInt<3>,ActaDecimal28,char
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     [29]>::operator=()0315 byte(s), x:\src\rww\actadecimalimpl.cpp, line 13140004 byte(s)
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00D8A267, Convert()+0999 byte(s), x:\src\eval\calc.cpp, line 0303
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBF9E0, XVal_cast::compute()+0272 byte(s), x:\src\core\compute.cpp, line 1664
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBC239, XStep_assn::execute()+0057 byte(s), x:\src\core\step.cpp, line 0069
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBB30D, XStep_sblock::execute()+0029 byte(s), x:\src\core\step.cpp, line 0707
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBB30D, XStep_sblock::execute()+0029 byte(s), x:\src\core\step.cpp, line 0707
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBE0BC, XPlan_spec::execute()+0348 byte(s), x:\src\core\plan.cpp, line 0082
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DC5EA0, XPlan_desc::execute()+0336 byte(s), x:\src\core\xplan.cpp, line 0153
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBD68E, XPlan_spec::compute()0206 byte(s), x:\src\core\plan.cpp, line 01450011 byte(s)
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00DBD891, XPlan_spec::compute()+0225 byte(s), x:\src\core\plan.cpp, line 0244
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:0074533A, AE_Main_Process_Options()+31498 byte(s), x:\src\xterniface\actamainexp.cpp, line 3485
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:00747EDA, AE_Main()1498 byte(s), x:\src\xterniface\actamainexp.cpp, line 07680030 byte(s)
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     001B:004029F9
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Registers:
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     EAX=0000000E  EBX=03E392E0  ECX=04B455A0  EDX=012346D8  ESI=02B75D88
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     EDI=04B455A0  EBP=00212738  ESP=002124BC  EIP=00CA9EAB  FLG=00210206
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     CS=001B   DS=0023  SS=0023  ES=0023   FS=003B  GS=0000
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Exception code: C0000005 ACCESS_VIOLATION
    5260     3284     SYS-170101     5/5/2009 4:43:21 AM     Fault address:  00CA9EAB 01:00585EAB E:\Program Files\Business Objects\Data Services\bin\acta.dll

    Hi Manoj & Tiji,
    Thanks for your comments. Please find the below outcome.
    print($is_job_enable); -- is not executed if PLSQL function is called.
    I changed $is_job_enable to VARCHAR, still the same issue.
    I created new project and executed the same in new job, still the same issue (all objects are new except Datastore).
    The dmp happens only when we the PLSQL function is called. I commented the Function call, the execution proceeds further but got hanged in other PLSQL function call (different than the 1st one)
    Is this bug in 12.1?
    Can you tell any Hot fix available? If possible please give me the SAP Notes Number.
    Is there any other way to execute the PLSQL functions/procedures in 12.1?
    Thanks
    Maran MK

  • Q: Error with TimestampAdd function

    Hi Gurus,
    In the rpd file referenced by my Siebel demo instance I have following error [NQError: 22025] Function TimestampAdd is called with an incompatible type
    Expression 1 is: " TIMESTAMPADD( SQL_TSI_DAY , CEILING("S_MKT_OLAP (MyConsumer Master)".""."MyConsumersMasterPhysicalSchema"."MyConsumers"."CU_DAYS_AS_CUSTOMER") * -(1), NOW())"
    Expression 2 is: " TIMESTAMPADD( SQL_TSI_DAY , CEILING("S_MKT_OLAP (MyConsumer Master)".""."MyConsumersMasterPhysicalSchema"."MyConsumers"."CU_AGE" * 365) * -(1), NOW())"
    Expression 3 is: " TIMESTAMPADD( SQL_TSI_DAY , CEILING("S_MKT_OLAP (MyConsumer Master)".""."MyConsumersMasterPhysicalSchema"."MyConsumers"."CU_DAYS_SINCE_LAST_PAYMENT") * -(1), NOW())"
    This is resulting in that the related presentation catalog is showing empty in the Marketing Segment Designer which is nothing but Answers.
    Could that be the source of my problem? How to resolve it?
    PS: I have very limited OBIEE and PLSQL knowledge, and I'm not a member of this DL so kindly keep me on copy.
    Many thanks in advance and regards,
    Jad

    Hi,
    Kindly refer the below link
    http://obieeelegant.blogspot.com/2011/06/obiee-date-expressions-reference.html
    First Date of Week:
    TIMESTAMPADD(SQL_TSI_DAY, (DAYOFWEEK(Current_date)*-1)+1, Current_date)
    Lat Date of Week:
    TIMESTAMPADD(SQL_TSI_DAY,DAYOFWEEK(Current_Date)*-1,TIMESTAMPADD(SQL_TSI_WEEK, 1, Current_date))
    First Date of Year:
    TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM CURRENT_DATE) * -(1) + 1, CURRENT_DATE)
    Last Date of Year:
    TIMESTAMPADD(SQL_TSI_YEAR, 1, TIMESTAMPADD( SQL_TSI_DAY , -1, TIMESTAMPADD( SQL_TSI_DAY , EXTRACT( DAY_OF_YEAR FROM CURRENT_DATE) * -(1) + 1, CURRENT_DATE)))
    Thanks
    Deva

  • How to continue the loop even there is an error in plsql

    Hi Folks,
    I am using function in my sql query.i want to write this query in a cursor loop.
    the thing is function is not updatable and it errors out for few records. now when i use the same function in cursor and loop it,it will stop the loop when it errors out.
    can you guys please help me out if there is any way to continue the loop even there is an error in plsql .
    My Function is as below:
    Decalre
    Cursor
    select ***********************;
    begin
    loop
    fetch********************
    x:=function(**);
    end loop;
    Guys please help me on this. your help is high ly appreciated.
    Thanks!!
    Karthik T

    Decalre
    Cursor
    select ***********************;
    begin
    loop
      BEGIN
      fetch********************
      x:=function(**);
      EXCEPTIONS
        WHEN your_error THEN
          log_error;
      END;
    end loop;

  • How to invoke PLSQL function result using SPEL for Rendered Property.

    Hi All
    I have requirement in Iprocurement to show a warning message in Shopping cart page when user click on the Add to Cart Button and irrespective of the warning message it should allow the user to continue to the next screen. We have 5 different stores in ShoppingHomePG and all of them lead to same screen for user date entry when we click on the store. But my requirement is to show a warning message for only one store.
    I created a TIP and showing a warning message on the screen. But this message is showing up for all the stores. I want to show only for one store.
    I have a SQL query to identify the store Name and I can return true or false value using plsql function. I am thinking there may be an option to invoke the plsql function boolean value using SPEL. Kindly suggest me how to acheive this.
    If my understanding is wrong about PL/SQL funciton with SPEL. Please point me in right direction to achive this requirement.
    OA Framework version : 11.5.10.5RUP
    Thank You!
    Krishna

    this is an error when i connect to application server by jdeveloper
    Error getting OC4J Process for: opmn-home+oc4j-test130.pythis-vpmn.com-6202-default:
    Too few bytes (7) received from OPMN response

  • How can I call a plsql function from an attribute?

    I have an attribute defined in an element. I want execute a PLSQL function from the attribute, and display the returne value with an HTML template.
    I've defined the attribute's type like PLSQL, and I've put the called of the function in the value of the attribute, but it doesn't work. The only value I obtain is an URL (I think that is the URL of the function or someting like this).
    How can I call to my function from the attribute and display the returnes value in the page?
    Thanks.

    Thanks, but it doesn't work. I have an attribute called ID_BOL and I want to associate a sequence to that attribute. I've created a function, with the sequence. This function return de value of the sequence. I want taht the attribute takes the value of the sequenece dinamically.
    I've tried it, creating the type attribute like PLSQL, and calling the function from the attribute, but it doesn't work.
    How can I return the sequence value to my attribute?
    Thanks.

  • While applying 4440000, "Error calling FNDLOAD function" Occurs.

    While applying the patch 4440000, the following error occured.
    ***********************************************************************************************Loading data using FNDLOAD function.
    FNDLOAD APPS/***** 0 Y UPLOAD @FND:patch/115/import/aflvmlu.lct @PER:patch/115/import/US/perzzlookup01823.ldt -
    Connecting to APPS......Connected successfully.
    Calling FNDLOAD function.
    Returned from FNDLOAD function.
    Log file:
    Error calling FNDLOAD function.
    Also, no log file for FNDLOAD generated.
    Referred the metalink note 441783.1. But unable to understand the solution. Can anyone please explain or other workaround if any?
    S. Sundar

    Dear Taylor,
    Thanks a lot. You are too excellent.
    After doing as follows, the problem is resolved.
    F:\oracle\product>ln -s 10.2.0 10_2.0
    F:\oracle\product>dir 10*
    Volume in drive F is New Volume
    Volume Serial Number is 08B6-ACF4
    Directory of F:\oracle\product
    12/16/2007 10:56 AM <DIR> 10.2.0
    04/01/2008 08:10 AM <JUNCTION> 10_2.0
    0 File(s) 0 bytes
    2 Dir(s) 10,004,815,872 bytes free
    F:\oracle\product>
    Thanks again.
    S. Sundar

  • ERROR WHILE UPLOADING FUNCTIONAL LOCATION MASTER DATA THROUGH LSMW?????

    Dear Experts,
    I am uploading the master data of functional location through LSMW .I had completed all the steps except "Run Batch Input Session".
    In that step it is showing as functional location already exists, after this error the remaining functional locations are updated in sap or it will stop total transaction by  this error???
    how can u upload the remaining in to sap by skipping already existed one????
    here I am uploading the error screen shot.
    Thanks & Regards,
    Sunil Boya

    Hi Jogeswara Rao Kavala,
    When I am pressing back or NO option  it is showing error like this
    What is this OK- Code means?
    how can I resume this process, even it was not going to back screen also and only one option is available for exit from this is by going into MENU-SYSTEM-SERVICES-BATCH INPUT-CANCEL.
    Sunil Boya

  • Error while posting GR "Internal error in FORM/FUNCTION CKML_F_BUILD_INDEX

    Dear Experts,
    While posting GR for any non-valuated material, I am getting an error "Internal error in FORM/FUNCTION CKML_F_BUILD_INDEX in position 1 with RC 0
    Message no. C+099"
    Kindly explore the possibilities of solution for the above error. The abve error only showing at the time of posting and not whicle Check.
    Regards,
    Tushar

    Hi Tushar,
    Your problem is happening because of the applicaiton of an SAP Note. I think PM has nothing to do with this Error. Pl. read the following (which I read this from one SAP website) & check the relevant SAP notes and take action or write to SAP  for solution.
    Symptom
    The posting of goods receipts results in a long runtime.
    Other terms
    ACTUPD, MIGO, performance, material ledger
    Reason and Prerequisites
    The actual costing is active.
    The performance problems usually occur when there are several procurement alternatives or procurement processes (tables CKMLMV001 and CKMLMV002) for certain materials.
    This can be caused by implementing the modification according to Note 1017470 or 919869, [...]
    Regards,
    Bala.

  • ORA-01403: no data found Error in PLSQL code raised during plug-in processing.

    Hello OTN community,
    We are having the access to APEX problem. a New user was setup to access the APEX application. When I test to login as a new user, I get the message "ORA-01403: no data found Error in PLSQL code raised during plug-in processing.". When click OK to the disply message, the application will take me out of the sstem. I need help to even understand what is happening. I didn't develop the application, there is no documentation for this application, I am just supporting the application whenever there is a problem and I am new to APEX. As you can see I need help to figure this thing out. Your help is dearly appreciated.
    Thank you OTN

    Try to check the query that is executed and check if there is data or not

  • Certificate issues Active Directory Certificate Services could not process request 3699 due to an error: The revocation function was unable to check revocation because the revocation server was offline. 0x80092013

    Hi,
    We have some problems with our Root CA. I can se a lot of failed requests. with the event id 22: in the logs. The description is: Active Directory Certificate Services could not process request 3686 due to an error: The revocation function was unable to
    check revocation because the revocation server was offline. 0x80092013 (-2146885613).  The request was for CN=xxxxx.ourdomain.com.  Additional information: Error Verifying Request Signature or Signing Certificate
    A couple of months ago we decomissioned one of our old 2003 DCs and it looks like this server might have had something to do with the CA structure but I am not sure whether this was in use or not since I could find the role but I wasn't able to see any existing
    configuration.
    Let's say that this server was previously responsible for the certificates and was the server that should have revoked the old certs, what can I do know to try and correct the problem?
    Thank you for your help
    //Cris

    hello,
    let me recap first:
    you see these errors on a ROOT CA. so it seems like the ROOT CA is also operating as an ISSUING CA. Some clients try to issue a new certificate from the ROOT CA and this fails with your error mentioned.
    do you say that you had a PREVIOUS CA which you decomissioned, and you now have a brand NEW CA, that was built as a clean install? When you decommissioned the PREVIOUS CA, that was your design decision to don't bother with the current certificates that it
    issued and which are still valid, right?
    The error says, that the REQUEST signature cannot be validated. REQUESTs are signed either by itself (self-signed) or if they are renewal requests, they would be signed with the previous certificate which the client tries to renew. The self-signed REQUESTs
    do not contain CRL paths at all.
    So this implies to me as these requests that are failing are renewal requests. Renewal requests would contain CRL paths of the previous certificates that are nearing their expiration.
    As there are many such REQUEST and failures, it probably means that the clients use AUTOENROLLMENT, which tries to renew their current, but shortly expiring, certificates during (by default) their last 6 weeks of lifetime.
    As you decommissioned your PREVIOUS CA, it does not issue CRL anymore and the current certificates cannot be checked for validity.
    Thus, if the renewal tries to renew them by using the NEW CA, your NEW CA cannot validate CRL of the PREVIOUS CA and will not issue new certificates.
    But it would not issue new certificates anyway even if it was able to verify the PREVIOUS CA's CRL, as it seems your NEW CA is completely brand new, without being restored from the PREVIOUS CA's database. Right?
    So simply don't bother :-) As long as it was your design to decommission the PREVIOUS CA without bothering with its already issued certificates.
    The current certificates which autoenrollment tries to renew cannot be checked for validity. They will also slowly expire over the next 6 weeks or so. After that, autoenrollment will ask your NEW CA to issue a brand new certificate without trying to renew.
    Just a clean self-signed REQUEST.
    That will succeed.
    You can also verify this by trying to issue a certificate on an affected machine manually from Certificates MMC.
    ondrej.

Maybe you are looking for