Insert data with collection data

Hi,
I am using a loop for inserting data into a table but it doesn't work.
On a form you can insert data for the items (text field). These data were stored in the collection 'COLLECTION_C1_T20':
if :P103_SEQNR is null then
apex_collection.add_member(
p_collection_name =>'COLLECTION_C1_T20',
p_c001 =>:P103_C1,
p_c002 =>:P103_C2,
p_c003 =>:P103_C3,
p_c004 =>:P103_C4,
p_c005 =>:P103_C5,
p_c006 =>:P103_C6,
p_c007 =>:P103_C7,
p_c008 =>:P103_C8,
p_c009 =>:P103_C9,
else
apex_collection.update_member(
p_collection_name =>'COLLECTION_C1_T20',
p_seq =>:P103_SEQNR,
p_c001 =>:P103_C1,
p_c002 =>:P103_C2,
p_c003 =>:P103_C3,
p_c004 =>:P103_C4,
p_c005 =>:P103_C5,
p_c006 =>:P103_C6,
p_c007 =>:P103_C7,
p_c008 =>:P103_C8,
p_c009 =>:P103_C9,
end if;
I have tried to concatenate the members C001, C002, ... of the collection with the counter v_count but an error is shown when I want to store the records into the table:
ORA-06550: line 124, column 9: PL/SQL: ORA-00904: "C00": invalid identifier ORA-06550: line 103, column 1: PL/SQL: SQL Statement ignored
The source code looks like this one:
for v_count in 1 .. 9
loop
insert into L01_RESULTS (TEST_RESULT)
values
   (select c00||v_count
    from apex_collections
    where collection_name = 'COLLECTION_C1_T20'
    and seq_id =
               select max(seq_id)
               from apex_collections
               where collection_name='COLLECTION_C1_T20')
end loop;
end;Any a idea how to manage this?
cheers,
ben

Mike,
it is a form (wizard) to store about 200 data. This is managed by clicking a button (FINISH).
I have about 10 processes to store the data and for testing I have decreased them to two processes. (8 processes are now executed when the button CANCEL is clicked and the other two are executed when the button FINISH is clicked.) So the process is executed by clicking the button.
I post the source code because it is possible that I made a mistake witch I couldn't figure out:
declare
order_number_value                VARCHAR2(30);
analyses_date_value               DATE;
analytical_method_value           VARCHAR2(20);
analyte_measured_value            VARCHAR2(40);
analyst_name_value                VARCHAR2(20);
valid_identifier_value            VARCHAR2(50);
v_sql                             varchar2(4000);
W_test_result                     varchar2(100);
readout_value                     varchar2(400);
begin
readout_value := 'SIG_NUM_CEN_CELL_';
for v_count in 1 .. 9
loop
v_sql:='select c00'||v_count||'
from apex_collections
where collection_name = ''COLLECTION_C1_T20''
and seq_id = (select max(seq_id) from apex_collections
where collection_name=''COLLECTION_C1_T20'')';
execute immediate v_sql into W_test_result;
insert into L01_RESULTS (READOUT, TEST_RESULT)
values (readout_value||v_count,W_test_result);
-- commit;
end loop;
end;ben

Similar Messages

  • Why does my phone use data with cellular data turned off?

    I have problems with my iPhone 5 using data on its own. It usually happens at night, with all the apps closed and plugged in to charge (should be connected to my wifi). Recently, I started turning off my cellular data any time I'm at home out of desperation to save my data. Last night, my phone used 6MB of data with my data off, plugged in. I use My Data Manager to track, it matches up with AT&T's record of my data usage, so I'm pretty sure the app is not wrong. I have the 200MB plan, so I have to be very careful and it's incredibly frustrating to wake up and find 6MB gone when cellular data was turned off. Does anyone know what's going on?  I haven't bothered calling Apple or AT&T, I never get anywhere with either one.

    I'm not familiar with My Data Manager but from the name I would think it would tell you what app or apps have used the data and that might help narrow down the problem. If it doesn't have that information, you can go to Settings > Cellular > Use Cellular Data For and that shows usage by each app and if you click on System Services in that list it will also give details of that usage. The numbers are since you last reset the statistics (bottom of that screen). With a little time and detective work you may be able to identify the cause.
    Also, there have been many discussions on various internet forums of AT&T (and other) reporting of the time of data usage not matching the actual time of the use. The usage numbers over a number of days for example are accurate but usage reported at 2AM may actually be a summary of some types of use that happened the previous day.

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • Billing user exit to overwrite the service rendered date with billing date

    Hello,
    My client would like to determin the rebate conditions based on billing date. However, the system only uses the service rendered date for rebate determination.
    Therefore, I am trying to overwrite the service rendered date with billing date at the time of billing creation.
    Could you please let me know what user exit I can use?
    I can't user the user exit RV60AFZC because the billing date is not determined when this user exit is running.
    Your help would be appreicated! I will give you good points! Thanks

    Hi Londa,
    Try using one of the following includes for your requirement.
    (a.) rv60afzz
    (b.) rv60afza
    (c.) rv60afzb
    (d.) rv60afzd
    (e.) BAdi SD_CIN_LV60AU02
    or if you are working with ECC 6.0 use the Enancement Spot ES_SAPLV60A available from SE80 by giving package VF and then selecting Enhancements and then expanding Enhancement Spots
    Hope these are helpful to you. Reward accordingly.
    Thanks and Regards,
    Maddineni Bharath.

  • Generic Extractor: enriching GL Data with Purchasing Data

    Experts,
    This is my first time with Generic Extractor.
    Requirement:
    We have a requirement to enrich GL data with Purchasing data via the Material Document Number.
    I need to provide this upto to the datawarehouse layer wherein another team will take over.
    Solution idea:
    Material Document is not part of the datasource 2LIS_02_SCL.
    a. Should I enhance this datasource to include material number  OR
    b. Develop a concept to create a generic delat enabled extractor that pulls data from EKBE, GR and IR information.
    In EKBE multiple material documents can exist per PO. The extractor returns 2 record per PO (before and after image) with the updated information.So if we have the first GR with Material document 901 and then a second GR with material doc 902 the extractor loads 3 records. New record, Before image and after image and the only one stored in BI is the after image. material doc would have value 902 if enhanced.
    For the generic extractor approach the  the ability to load deltas is crucial, since the EKBE table is very big. Maybe
    "CPUDT-Day On Which Accounting Document Was Entered" and "CPUTM-Time of Entry" can be leveraged as delta hook.
    Any ideas???
    Thanks,
    Jain

    No one answered

  • Hello, I recently bought a new Laptop and wanted to sync all my data from the old one. Accidentaly I merged my Sync Data with Device data, how can i recover it?

    hello, i recently merged my Sync data with New device Data , because the option MERGE THIS DEVIC's DATA WITH SYNC DATA was checked, how can i recover my stuff back ? from a previous state

    Sorry, SYNC don't have that option right now

  • OWB Can't Import Existing Package with Collection Data Type as Arguments

    I created a package and compiled it successfully as the follows:
    +++++++++++++++++++++++++++++
    CREATE OR REPLACE PACKAGE PACKAGE_TEST AS
    TYPE Num_LIST IS TABLE of NUMBER INDEX BY BINARY_INTEGER;
    FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER;
    FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER;
    END PACKAGE_TEST;
    CREATE OR REPLACE PACKAGE BODY PACKAGE_TEST AS
    FUNCTION TEST_FUNCTION1 ( arg1 NUMBER, arg2 NUMBER) RETURN NUMBER IS
    ln_sum NUMBER;
    BEGIN
    ln_sum := arg1 + arg2;
         RETURN ln_sum;     
    EXCEPTION
    WHEN OTHERS THEN
    RETURN -10000;     
    END TEST_FUNCTION1;
    FUNCTION TEST_FUNCTION2 ( args NUM_LIST) RETURN NUMBER IS      
         ln_sum NUMBER;
    BEGIN
    ln_sum :=0;
         FOR i IN 1.. args.COUNT LOOP
         ln_sum := ln_sum + args( i );     
         END LOOP;     
         RETURN ln_sum;     
    EXCEPTION
    WHEN OTHERS THEN
    RETURN -10000;     
    END TEST_FUNCTION2;     
    END PACKAGE_TEST;
    ++++++++++++++++++++++++++++++++++++++++
    Then I tried to import the package into OWB (9.2). The problem came: all the package body and
    the specification of TEST_FUNCTION1 were imported, but the package specification of
    TEST_FUNCTION2 couldn't be imported. The IMPORT FILTER gave an error message:
    "TEST_FUNCTION2: Argument Data type is not supported".
    How to resolve this problem? It is very import for our project, since we have to import some
    packages with user_defined collection data types as arguments.
    Thank you.
    Lushu

    Hi Lushu,
    Unfortunately this is indeed not supported and I would not know how to work around this one. The only way I guess that this would work is to not import it, and then use Expressions to call the function with inputs.
    Jean-Pierre

  • How to build a array with collected data

    Hi,
    I have collected data from serial port with VISA. Now I want to build a array with 100 date points. Should I connect VISA Read with Build Array directly? How to do it?
    PS: All of them are in a While Structure.
    Thank you!

    An inefficient way to create the array is to use the build array and a shift register as shown below. It's more effecient in terms of memory management to create the array and then use the replace array subset as shown in the other image. Of course, if you don't need the array inside the loop, just wire the value out of the while loop and on the exit tunnel, right click and select 'Enable Indexing'.
    Message Edited by Dennis Knutson on 07-03-2007 10:25 PM
    Message Edited by Dennis Knutson on 07-03-2007 10:26 PM
    Attachments:
    Crude Build Array.PNG ‏4 KB
    Better Build Array.PNG ‏6 KB

  • To comapre a single date with multiple dates

    Hi All,
    I am using fetch xml report in which there are two table Opportunity and activity
    One Opportunity with have multiple activity
    Opportunity has a field  called new_dateofapplication
    and Activity has a field called StartDateActivity which have multiple values
    i need to compare these dates somehow as below  but it didnt work
    =iif((Fields!new_dateofapplicationValue.Value)<=(Fields!StartDateActivityValue.Value),sum(Fields!ActivityDurationValue.Value),0)
    for e.g
    Any help much appreciated
    Thanks
    Pradnya07

    Hi Simran08,
    According to your description, you have two tables in your report. Now you want to compare the date in Opportunity table with the date in Activity table, sum all activity hours which their date are later than the start date. Right?
    In Reporting Service, if you want to compare two values in IIF() function without using Lookup/LookupSet, these two data fields need to be in same scope. Your date are from different tables. It seems you have different datasets for those tables. This may
    be the reason why you can’t make your expression working in your report. And for comparing data from different datasets, we only have Lookup/LookupSet function. However, this function is only working in conditions where the value of one field is equals to
    the value of the other field. So we can never use this function to judge if the value of one field is greater/less than the value of the other field. So in your scenario, it’s impossible to find a solution if your Activity table only has those two columns.
    Also if you get the total hours in that way (like you post in your picture), you can’t figure out how many hours in total hours are spent on each program. But I guess it supposed to have some fields in your Activity to show clients and program. If so, you
    just need to set groups in your table and get total in group footer. It will looks like below:
    If possible could you post the dataset and table structure or any other detail information about your report? That can help us tested your case in our local environment and do further analysis. Thank you.
    Reference:
    LookupSet Function (Report Builder and SSRS)
    Best Regards,
    Simon Hou
     

  • To compare date with another date in string in siebel bip report

    Hi,
    In my rtf I am comparing a Date1 with a date in string i.e. '10-NOV-14'. If Date1 is less than '10-NOV-14' I am dispalying a certain text and if not another text.
    This condition is working fine if Date1 have 2014 values but if  Date1 cointains 2015 date than the mentioned condition is falling.
    Kindly suggest any solutions.
    Regards,
    Siddhika

    This example may help:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version="1.0">
    <xsl:param name="currentDate"/>
        <xsl:variable name="firstDate" select="concat(substring($currentDate, 1,4),substring($currentDate, 6,2),substring($currentDate, 9,2))"/>
        <xsl:template match="/">
            <xsl:apply-templates select="//item"/>
        </xsl:template>
        <xsl:template match="item">
            <xsl:variable name="secondDate" select="concat(substring(submissionDeadline, 1,4),substring(submissionDeadline, 6,2),substring(submissionDeadline, 9,2))"/>
            <xsl:choose>
            <xsl:when test="$firstDate &gt; $secondDate">
                <xsl:call-template name="late"/>
                </xsl:when>
                <xsl:when test="$firstDate &lt; $secondDate">
                    <xsl:call-template name="ontime"/>
                </xsl:when>
                <xsl:when test="$firstDate = $secondDate">
                    <xsl:call-template name="same"/>
                </xsl:when>
                <xsl:otherwise>Monkeys<br /></xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="ontime">
            This is on time
        </xsl:template>
        <xsl:template name="late">
            This is late
        </xsl:template>
        <xsl:template name="same">
            This is on time
        </xsl:template>
    </xsl:stylesheet>

  • How to compare user entered date with current date

    Hi all
    my requirement is, user allowed select one date, in code i have compare this date with current day date. it should be 15days gap other wise display error message.
    I am worried about how to get current date in code. Is there any code to get current date. please reply me with code or mail me at [email protected]
    Thanx
    keerthi

    Keerthi,
    Use the method <b>getDifference()</b> of the DateHelper.java available here.<a href="http://www.koders.com/java/fid14A61FEB1B45A64E42E1DCAD7070B46AE46340BA.aspx">DateHelper</a>
    1. Create a new folder, say Util under your src folder. (com.xyz.util)
    2. Put this DateHelper.java file in that folder,(com.xyz.util) .
    3. Now, write an import statement for this java class in the required view.
    4. Use the getDifference() method of this class to the difference in days between two days.
    Or
    Simply use this code.
    // Get msec from each, and subtract.
    long diff = currDate.getTime() - selectedDate.getTime();
    int noOfDays = diff / (1000 * 60 * 60 * 24);
    where currDate is today's Date and selectedDate is the Date selected by the User.
    Bala

  • PowerPivot Dates with no Data

    I've got a classic "fact" table with Membership data linked to a "date" dimension table.  The fact table stores membership data at each month end date.  My Members Added measure works as expected, but Members Added YTD repeats
    for every date in the Dim_Date table.  I wasn't expecting that.  I only want to show the dates for which there is data.
    Members Added:  =CALCULATE(SUM(Fact_MemberWalk[MemberCount]),Fact_MemberWalk[TranType]="New Member")
    Members Added YTD: CALCULATE([Members Added],DATESYTD(Dim_Date[DateKey]))
    Picture of Problem:
    Kirk P.

    Hi Kirk,
    According to your description, this issue is more related to Power Pivot. The Power Pivot forum is a better place for Power Pivot issue, we will move it there for you.
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Compare finish date with target date

    Would like to keep track of late Projects by comparing the finish date with the target date but are unable to do so. The idea is just to filter and count the summary tasks which have a later Finish date than the target date and present that as a the number
    of late Projects. However it does not work, when trying to setup the filter Project tells that the target value can not be used for comparasion against the finish date.
    Does anyone have a workaround or maybe a better solution to keep track of late Projects. Please note that we are talking about Projects that risk to be late compared to a date promised to a customer. When we plan we always add some extra time at the
    end to have some extra when the Project is delayed at a certain department, however we want to keep track of how many late Projects we have and how late they are. Are not after seeing the status for each departments, only how we are doing in relation to what
    we have promised our customers.
    Kind regards //Anders

    Anders,
    Trevor and Dale have tried to steer you towards the normal tracking fields and methods already available in Project, but let me take a more direct approach to your exact question. First of all, you didn't tell us what field you are using as the "target date".
    I'll assume it is the Date1 field manually entered for each summary line.
    You could probably produce something close to the report you want with custom field formulas, filters and some manual counting but let me offer a more automated approach. The following macro will examine each summary task in your project and determine if
    the finish date is before or on the target date (Date1), or if it is after the target date. If it is after the target date, that will count as one late project/order and add it to a running count of late orders. The difference in days will also be tracked
    and added to a running total of delay. At the end, a message will appear in the exact format you describe.
    Sub LateReport()
    Dim t As Task
    Dim LateCount As Integer
    Dim LateDays As Integer
    Dim TotDelay As Integer
    For Each t In ActiveProject.Tasks
        If Not t Is Nothing Then
            If t.Summary = True Then
                If DateValue(t.Finish) > DateValue(t.Date1) Then
                    LateCount = LateCount + 1
                    LateDays = DateValue(t.Finish) - DateValue(t.Date1)
                    TotDelay = TotDelay + LateDays
                End If
            End If
        End If
    Next t
    MsgBox "Number of late orders: " & LateCount & " (" & TotDelay & " days of total delay)"
    End Sub
    Note, in my view, and I'm sure in Trevor and Dale's also, the Finish field of the summary line does not indicate completion, it simply indicates the scheduled finish date of the last task in the subtasks under that summary. I think you should use the Actual
    Finish date as the comparison value since it indicates when the project/order is complete. If you do decide, actual finish is a better choice, then substitute t.ActualFinish for t.Finish in the above macro.
    My input.
    John

  • How to compare Sale data with Previous data

    Hi Guys,
        Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
    Thanks & regards,
    Naveen Bhatia

    Hi Naveen,
    Did yo ucheck t-code SD01
    Regards
    Rohit.

  • How to Recover SD Data with SD Data Recovery Software?

    There are various kinds of SD card recovery program in the market ,data recovery software is your top choice when you encounter SD card malfunction. This excellent SD card recovery tool is focus on recover lost files beautifully including data lost from formatted or damaged SD card which could not be accessed normally, virus attack, software crash, hard disk not formatted error, etc ,it also offers various service like hard drive partition file recovery, external hard drive file recovery , memory card file recovery, USB drive file recovery, etc.
    We use SD card frequently by using card reader to achieve important files stored in it. as it is small in size ,so it is portable and very convenient. Meanwhile, SD card is also very fragile and easy to be corrupted. There are two main reasons for SD card data loss. One is hardware corruption which is unable to be recovered unless we send the SD card the professional data recovery service center , the other is software corruption like accidentally deletion of files and virus infection ,which would be recovered data recovery software .H-Data Recovery Master is great to recover android lost formatted data with easy.

    You need either an iTunes backup on your computer or an iCloud backup to restore your app data. Other data may be recoverable:
    If you had enabled iCloud sync you can recover contacts, calendar events, notes and email by syncing your new device to iCloud. You can also view it by logging in to https://icloud.com
    If you had enabled Photo Stream or Photo Sharing you can recover photos from it.
    You can sync your music from iTunes on your computer, or, if it was purchased from iTunes, you can download it again.

Maybe you are looking for

  • White screen with no response to any input or hard reset.

    I recently tried using my iPhone, and shortly after using it the screen began to malfunction, it stopped responding to touch, froze entirely, then did some of the normal LCD breaking stuff (strobes of colours, etc). it is now stuck on a pure white sc

  • Maintaining Session State

    Hello, Does anyone know how to maintain session and application variables through server restarts? I want to be able to shutdown and startup my Tomcat server without having the users lose their session and application variables (and consequently, the

  • Open a form from Find Form

    Hi, I am developing a new form using 6i Forms. The requirement is to first have a Find form and then when we click on 'Find', it should open the main form. I have developed both the forms. But my question is, where do we explicitly define that it sho

  • Net 1.1 apps broken after installing ODP 10.2.0.2.21

    The .net 1.1 app, build in Borland/CodeGear's tool, shows a configuration complaint from asp.net (below). Two machines that just got this version of ODP are showing the same problem. In oracle\product\10.2.0\client_1\ODP.NET\bin\1.x I have: 08/10/200

  • I have an error message in dreamweaver that doesn't permit me to preview in firefox.

      Unable to  launch Macintosh HD:System:Library:Automator:LaunchApplication.action:Contents:Resources:no.lproj.:main.ni b.  Please be sure that this application exists and that there is enough memory to run it.