Test Data Manager

  • 1.  Update Sequence Using @seqlov sqllist Function

    Posted Sep 14, 2018 07:17 PM

    Hi All,

     

    I am creating a Data Publish, where I make a select in a sequence, I save this value in a variable, I create an update with this value adding +1 to update, but when I run I get this error:

     

    If anyone knows what it can be, could you help me ?

     

    STOPPED!
    Publish to file (XLS):
    Start date and time: 14/09/2018 20:05:28

    Default values used for Variables

    Publish XLS to folder: C:\Users\x192674\Documents
    Start date and time: 14/09/2018 20:05:34
    Variables and values are:
    fk_parent = CDI
    intradet = 0 - Resolve prior value: 0
    nextSeqVal = @execsql(T,select next_val from OPICS.T___SEQUENCE where PK_NAME='RHIS')@ - Resolve prior value: 589714

    Initialising datastores: 14/09/2018 20:05:34

    Status Table Seq Rows Comments
    Publish RHIS 1 1
    Publish T___SEQUENCE 2 1
    Publish UPDATE_SEQUENCE 3 1

    Pre-publish actions: 14/09/2018 20:05:35

    Data Preparation starting: 14/09/2018 20:05:35

    Data Preparation errors - STOPPING

    Finishing: 14/09/2018 20:05:35

    End date and time: 14/09/2018 20:05:35
    Total Elapsed time: 1 seconds

    Publish errors occurred - See below


    Publish errors

    Data in var line/iteration #1/1 row #1 of table "UPDATE_SEQUENCE" column "ID" in step "Cotação" contains data "@seqlov(0,@sqllist(S,UPDATE OPICS.T___SEQUENCE SET Next_Val = @add(~nextSeqVal~,1)@ WHERE PK_NAME = 'RHIS')@)@" [@sqllist(S,UPDATE OPICS.T___SEQUENCE SET Next_Val = 589715 WHERE PK_NAME = 'RHIS')@ ORA-24333: zero iteration count
    UPDATE OPICS.T___SEQUENCE SET Next_Val = 589715 WHERE PK_NAME = 'RHIS'] which is invalid/unresolved.
    Column details: ID numeric NOT NULL
    Data Preparation errors - STOPPING

    Publish log location: C:\Users\x192674\AppData\Roaming\Grid-Tools\Data_Pool_Cotação.log

     

    Thans a Lot....



  • 2.  Re: Update Sequence Using @seqlov sqllist Function

    Broadcom Employee
    Posted Sep 17, 2018 06:18 AM

    Hello there.  It looks like the variable is not being resolved.  Instead of creating the variable and adding 1 to it, have you tried using the nextval(sequence) function.



  • 3.  Re: Update Sequence Using @seqlov sqllist Function
    Best Answer

    Posted Sep 17, 2018 11:16 AM

    In addition to what Billy mentioned... Please double check your syntax. Normally sequences are updated with ALTER SEQUENCE, not an UPDATE statement.

     

    If you still have problems/questions, please provide some additional details of what you are attempting to accomplish and we might be able to provide some further guidance.