Plugin data: determine the string table values ranging

Hello, once again

I have always fought with a use composed of data from the separate tab

When I read a line via

sMyLine = file.getnextline

and try to extract the values with

aMyValues = split (sMyLine, vbTab etc.)

the returned array is Variant.

Now I try to assign values of this array of different channels, for example

for i = 1 to Ubound (aMyValues)

... root channelgroups (j). Channels (i). Values (k) = aMyValues (i)

next

This results in an error message "this channel has been generated with e64 Type, values to fill must not be of type VT_BSTR" or what would be the translation into English.

So I have to turn the table variant to a R64-table. However cdbl (aMyValues (1)) will not work.

Workaround heavy:

When reading data with

root... channelgroups (1). Channels (1). Values (1) = file. GetNextStringValue (e64)

the value is of the appropriate type. But this translates many read-only operations.

Is there a way to read in one line and add the values of channels? File.GetStringBlock in the examples is especially used with DirectAccessChannels.Add. But I don't want the new n-channel, but rather add to already existing ones.

Thank you for your support.

Michael

Hello

I think that there are several ways to reach your goal.

If you want to assign the values in your table variant of a digital channel, you can use the File.Formatter.ParseString () method. Please make sure you that trainers for your numeric values are defined according to the needs, for example, File.Formatter.DecimalPoint, etc.

File.Formatter.DecimalPoint = «»
...
for i = 1 to Ubound (aMyValues)
... root channelgroups (j). Channels (i). Values (k) = File.Formatter.ParseString (aMyValues (i), eR64)
next

The best way is to use the StringBlock object. If you do not want to create a new channel for each DirectAccessChannel, you can use ProcessedChannel to add multiple DirectAccessChannels, for example

Dim processedChn: Set processedChn = channelGroup.Channels.AddProcessedChannel ("ChannelName", eR64, eConcatProcessor)
...
processedChn.Channels.Add (DirectAccessChannel)

I hope this helps.

Tags: NI Software

Similar Questions

  • How to insert 10,000 records test data into the emp table

    Hi I am new to oracle can someone please help me write a program so that I can insert the test data into the emp table
    SELECT       LEVEL empno,
                 DBMS_RANDOM.string ('U', 20) emp_name,
                 TRUNC (DBMS_RANDOM.VALUE (10000, 100000), 2) sal,
                 DBMS_RANDOM.string ('U', 10) job,
                 TO_DATE ('1990-01-01', 'yyyy-mm-dd')
                 + TRUNC (DBMS_RANDOM.VALUE (1, 6000), 0)
                   hiredate,
                 CASE
                   WHEN LEVEL > 10 THEN TRUNC (DBMS_RANDOM.VALUE (1, 11), 0)
                   ELSE NULL
                 END
                   mgr,
                 TRUNC (DBMS_RANDOM.VALUE (1, 5), 0) deptno
    FROM         DUAL
    CONNECT BY   LEVEL <= 10000
    
  • Historical data in the audit tables

    We are facing the following requirement of our current customer.

    They run a number of workflow manually for a few years, and they have retained the historical data in Excel spreadsheets. Now, they want to start using the BPM Suite.

    They would like to query power and display the track Audit Suite BPM of all workflows, i.e. not only those who will be executed with BPM Suite in the future, but also those who have been stored in spreadsheets Excel over the years.

    I have a few questions about this:

    What is a reasonable demand?
    My guess is that we need to load historical data in the tables of audit BPM (BPM_AUDIT_QUERY, etc.), is - that correct?
    Any suggestions on how to get there?

    I was reading the doc, Googling the web and searching this forum and I have not found yet any relevant material on this subject.

    Concerning

    Juan

    Published by: Juan Algaba Colera on October 11, 2012 04:14

    It would be very difficult to directly load their data in the audit tables. Also check tables are stored in the soa-infra schema which is usually configured to be served after a certain period of time so that it grows indefinitely, because it contains all the runtime information as well. You will need to determine how long they need these historical data and configure properly the purge and the size of the DB correctly for this amount of data.

    If data in excel are truly one, the new BPM process the best way to get the audit data in the process can be use the APIs to create instances of the process and then automate execution of each task as defined in the spreadsheets. This way these past instances have been run through the system.

    In most cases this is not done however. Most of the customers usually somewhere archived these worksheets in case they need to recover, but will not try to make that old data visible from the BPM workspace and to view an audit trail.

    Thank you
    Adam DesJardin

  • Code to get the data in the child table in composite SOA using the IOM APIs

    Hi all

    I am a new bie to IOM. I have a query related to obtaining data in the child table using the API of the IOM in the task of embeded java SOA composite.

    I've created a workflow that has a form of child of providing service of slef. I created a composite SOA custom also approval. In the composite approval I have embedded java code and I want to get the values entered in the child form using the API IOM inot the java code embeded in composite SOA.

    I tried gettting the child form data by using getChildAttributes(), but I'm getting the following exception.

    The local Exception stack:
    Exception [EclipseLink-7242] (Eclipse - 2.1.3.v20110304 persistence Services - r9073): org.eclipse.persistence.exceptions.ValidationException
    Description of the exception: an attempt was made to navigate a relationship using indirection that had a null Session. This often happens when an entity has a relationship of LAZY not instantiated is serialized and this lazy relationship is crossed after serialization. To avoid this problem, instantiate the LAZY relationship before serialization.
    at org.eclipse.persistence.exceptions.ValidationException.instantiatingValueholderWithNullSession(ValidationException.java:994)
    at org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:218)
    at org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:83)
    at oracle.iam.request.vo.RequestBeneficiaryEntityAttribute.getChildAttributes(RequestBeneficiaryEntityAttribute.java:100)
    to com. CASApproval.main (CASApproval.java:137)

    Please suggest me if I'm following the correct procedure of the child form data or if we can use another approach.

    Can we get the data using formInstanceOperationsIntf.getProcessFormChildData ().

    Thanks in advance for the help.

    Thank you
    PT

    When you're in approvals, there is no form of process data. Process form data would come only when approvals are completed. If you want to read data from the child form of the DataSet (i.e. the form object as in OIM9.x) you can use the RequestService on the id of the request and read the data. Or another approach would be to the child the dataset data value in the payload of the request and read the XML payload in the composite.
    Let me know if you need more information about the second approach. As for the first approach, search through the forums here and you should find my previous posting on how to reach child dataset values using the ask service API.

    -Marie

    Found these for you:
    OIM11G: Way to get values from dataset of the application for approval
    Re: How to get the value of the AD details of payload of SOA user group

  • How to insert the legacy data into the QP_RLTD_MODIFIERS table?

    How insert Legacy data into the QP_RLTD_MODIFIERS table in the instance of R12.

    I would use the QP_Modifiers_PUB API. Process_Modifiers to push the old data on prices in R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environment, only the promos are given in this table).

  • Using data from the control table

    Hello

    I would like to use the data entered in a table to automate volume/sequence of airflow for a test Chamber. As shown in the screenshot of control table, the first column indicates the number of iterations by elements of array in a series of tests and the second data column specifies the length of each line sequence. Entries in the other columns are specific to different valves and specify values set required in the flow meter.

    I guess my question is how can I index/assign each column of the table such that the data to exploit the respective valves are obtained in subsequent iterations all acquire simultaneously with data from other components in the order? While I recognize that the solution may be very simple, I searched on through various examples and messages on the tables and the tables without knocking on a solution. The attached .vi allows me to be a part of the series of tests.

    Best regards

    Callisto

    Hi Callisto,

    If I understand your question then the solution is actually quite simple. The important point to keep in min is the fact that the Table control can actually be treated as an array of string. You can then use all the traditional table manipulation tools and techniques to manipulate your data as you wish. For example, use the Array Index function to retrieve specific columns and then if you want to spend the individual elements in a column in a loop, wire the table until the loop and ensure that indexing is enabled. If you then want to use these data elements to control your test application, you can convert a portion of the resulting string in more useful to digital.

    All these concepts are illustrated in the attached VI. I hope this helps, but let me know if you have any other questions.

    Best regards

    Christian Hartshorne

    NIUK

  • The adjacent table values

    What would the most effective way in labview to explore an array of 1 d 0 and 1 and store indexes side 1 is as a new line in a 2d array? For example, I have an array of 0 0 0 0 1 1 1 0 1 1 0, resulting 2d table will look like this:

    4 5 6

    8 9

    where these numbers represent the index of the adjacent 1.

    Help with this is appreciated.

    A few problems.

    Change your meter and line numbering of dual representation, I32 or another type of integer.  This is probably why you stuck in a loop of the search for zero.  Rounding errors in double can lead to inequalities between the numbers you might otherwise consider the same thing.

    You have localitite.  You have a condition of critical competition for the number of lines in the real case of the structure of the case.  You want the number of rows, incremented by 1, or at the first 2 - D array index page?  As it is now, there is no control over which no comes first.  Eliminate all local variables.  Replace them with wires and start using shift registers to manage values between iterations of the loop.

    Another problem is your loop stops when your account equals the number of items in the table.   Your count begins as zero.  It seems that the number is incremented at each iteration of the loop.  Finally, your account will equal the number of items in the table and the loop exits.  But all the other codes in this iteration will still occur.  If you have a table of 5 elements, your indices range from 0 to 4.  But your account is now 5.  The loop stops when the iteration has been completed, but now you are trying to index the element 5 (which doesn't exist) and also item 6 (5 + 1) that does not also exist.  In fact, you will have the problem in the previous iteration because there is no element 5 (4 + 1).

    Another problem is the way in which you are using insert into the table.  If you start with an empty table and try to insert into a table in a different row or column outside 0, you get nothing.  Or if you have 4 lines and you try to insert in line 5 or higher, nothing is added.  Insertion in the table is the wrong function to use probably 95% of the time.  You should use table to build.

    Why do you have a business structure in the false case puts a real, and in the real deal puts a fake?  It's a Rube Goldberg.  It doesn't cause a problem, but it's just useless code.  Just wire the comparison to stop and put on a NOT operator.  If you change the status of the loop continues if it is true, you can eliminate the not! as well.  In addition, rather than add a 1 to a number, there are a + 1 increment operator in the digital palette.  (A little less code means a little cleaner diagram).  In addition, you don't need two separate functions of the Index table.  You can use one and resize it down.  If wire you the County in the top, the bottom (that you just added in developing the service) will give you the index after counting.)

    I don't have your global variable.  (Where are the data coming from?) VI another?)  If you can replace this world with a constant matrix with some typical data, it would give us something to work with.

  • Interactive report using month Picker Plugin-date maximum one month given values of display column?

    create table test

    (

    The user ID number,

    created_on date

    )

    Insert into test values(1,'03/11/2014');

    Insert into test values(1,'03/27/2014');

    Insert into test values(1,'04/14/2014');

    Insert into test values(1,'02/20/2015');

    Insert into test values(1,'02/27/2015');

    Insert into test values(2,'03/10/2014');

    Insert into test values(2,'03/19/2014');

    Using http://www.Oracle-and-apex.com/plugin-month-picker/ in report interactive apex:-

    I want the answer which is the maximum date of the month and year

    for a specific user for the month selected

    For example if I chose March 2014

    as input is 03-2014

    so it should display

    username created_on

    1 27/03/2014

    2 03/19/2014

    Help, please

    oracle 11 g r2 database version

    Apex Oracle version 4.2.4

    ReemaPuri wrote:

    create table test

    (

    The user ID number,

    created_on date

    )

    Insert into test values(1,'03/11/2014');

    Insert into test values(1,'03/27/2014');

    Insert into test values(1,'04/14/2014');

    Insert into test values(1,'02/20/2015');

    Insert into test values(1,'02/27/2015');

    Insert into test values(2,'03/10/2014');

    Insert into test values(2,'03/19/2014');

    Http://www.oracle-and-apex.com/plugin-month-picker/ in report using interactive apex: -.

    I want the answer which is the maximum date of the month and year

    for a specific user for the month selected

    For example if I chose March 2014

    as input is 03-2014

    so it should display

    username created_on

    1 27/03/2014

    2 03/19/2014

    Help, please

    oracle 11 g r2 database version

    Apex Oracle version 4.2.4

    Based on the information provided:

    select
        userid
      , max(created_on)
    from
        test
    where
        created_on >= to_date(:p1_month_picker, 'mm.yyyy')
    and created_on < add_months(to_date(:p1_month_picker, 'mm.yyyy'), 1)
    group by
        userid
    

    However, I suspect that the information provided is not the full story...

  • Display data in the form of values separated by commas - need help

    Hi all

    I have some data formatted in the way below. The ID of the drug are the primary keys of the table and the first 9 digits in the drug ID are the same. They can be separated based on the last two digits.

    Type of drug drug ID
    00603107554 respiratory
    00603107556 cough and cold
    Antitussive-00603107558


    I want that data to be formatted as
    Type of drug drug ID
    006031075 respiratory, cough and colds, Antitussive

    I want to cut the last two characters, and format data. And the types must be displayed in the form of values separated by commas. Can someone help me?

    Thanks in advance

    Rambeau
    WITH t AS (SELECT '00603107554' Drug_ID, 'Respiratory' Drug_Type FROM DUAL
               UNION
               SELECT '00603107556', 'Cough and Cold' FROM DUAL
               UNION
               SELECT '00603107558', 'Antitussive' FROM DUAL)
        SELECT Drug_id, SUBSTR (SYS_CONNECT_BY_PATH (Drug_Type, ','), 2) Drug_Types
          FROM (SELECT SUBSTR (drug_id, 1, LENGTH (drug_id) - 2) drug_id,
                       Drug_Type,
                       ROW_NUMBER ()
                       OVER (PARTITION BY SUBSTR (drug_id, 1, LENGTH (drug_id) - 2)
                             ORDER BY Drug_Type)
                          rn
                  FROM t)
         WHERE CONNECT_BY_ISLEAF = 1
    START WITH rn = 1
    CONNECT BY PRIOR rn = rn - 1 AND PRIOR drug_id = drug_id
    
    DRUG_ID     DRUG_TYPES
    006031075     Antitussive,Cough and Cold,Respiratory
    

    just a note, I wonder if blushadow could consider adding techniques agg string to its very useful faq section because it seems a good
    request.

    Published by: pollywog on April 14, 2011 06:42

    Published by: pollywog on April 14, 2011 06:43

  • Select the string table drop-down list box.

    Hi all

    I want to select the combo box list based on a string in the entry, I don't know how to do this. I have a drop-down list box and the value comes from a database, what I want to do is I want to change the value of the selected box based on the existing value in the database drop-down list. for example, A, B, C D I strings in the drop-down list box, and then in my database, I have a field with the string C, I want to change the C to A. I can't enter the value of C in a string format, but I don't know how to be the first position of the drop-down list box in so the order of channels combo box will be C, A, B, d., the value of C

    Thank you

    Then just write a new array of strings, with the elements of the new agenda, to the "[] strings" - property.

    Either you must code something that allows you to create an array of strings with the elements in the order that you want them to be. If there is a reorganization only, you could do something like:

    -Get the array of strings [] from the drop-down list using a property node box.

    -Find the position of the element you want to place first and use "delete from table", which returns the new array and the element removed.

    -Build a new table 1 d of the deleted item and table remaining. Move to the second combobox Strings [] property of a node property.

  • Reset the filter table values in Jdev 11.1.1.7

    Hi Experts,

    I use Jdev 11.1.1.7

    I went through this link Ashish Awasthi (Jdev/ADF) Blog: table light filter in the ADF value

    I created a column and the value rowHeader as true. After you run this page, I'm not able to see the pencil icon which is reset all the values of the filter components and update the table.

    I don't want to reset by program, I want to use the functionality of the ADF.

    Here writing my code snippet:

    < af:table value = "#{bindings." Var EmpResultReportPVO11.collectionModel}"="row ".

    lines = ' #{bindings. " EmpResultReportPVO11.rangeSize}.

    emptyText = "#{bindings." EmpResultReportPVO11.viewable? "{'No data to display.': 'Access Denied.'}".

    fetchSize = "#{bindings." EmpResultReportPVO11.rangeSize}' rowBandingInterval = '0 '.

    filterModel = "#{bindings." EmpResultReportPVO1Query.queryDescriptor}.

    queryListener = ' #{bindings. " FilterVisible EmpResultReportPVO1Query.processQuery}"="true"varStatus ="vs. "

    selectedRowKeys = ' #{bindings. " EmpResultReportPVO11.collectionModel.selectedRow}.

    selectionListener = "#{bindings." RowSelection EmpResultReportPVO11.collectionModel.makeCurrent}' = 'single '.

    ID = "res_table" >

    < af:column id = 'c12' width = "14" rowHeader = "true" / >

    < af:column sortProperty = "#{bindings." EmpResultReportPVO11.hints.EmpId.name}"blockable ="true"sortable ="true ".

    headerText = "#{etoolviewcontrollerBundle.EMPLOYEE_ID}" id = 'c3' returned 'false' = > "

    < af:outputText value = "#{rank." EmpId}"id ="ot9">

    < af:convertNumber groupingUsed = 'false' pattern = ' #{bindings. " EmpResultReportPVO11.hints.EmpId.format}"/ >

    < / af:outputText >

    < / af:column >

    < af:column sortProperty = "#{bindings." EmpResultReportPVO11.hints.Name.name}"blockable ="true"sortable ="true ".

    headerText = "#{etoolviewcontrollerBundle.FIRST_NAME}" id = 'c4' = "caseInsensitive" filterFeatures > "

    < af:outputText value = "#{rank." Name}"id ="ot4"/ >

    < / af:column >

    Please someone help me.

    Thank you, ADV

    Jyoti

    Hi Jyoti,

    I think that the rowHeader = true does not work in 11.1.1.7. You can go with the programmatic approach.

    1 link table you with bean class

    2. the button click event of Action the code below

    private richeTableau empTable.

    {} public void filterTable (ActionEvent actionEvent)
    Add the code in the event here...
    FilterableQueryDescriptor = queryDescriptor
    (FilterableQueryDescriptor) getEmpTable () .getFilterModel ();
    If (queryDescriptor! = null &)
    queryDescriptor.getFilterCriteria ()! = null) {}
    queryDescriptor.getFilterCriteria () .clear ();
    getEmpTable () .queueEvent (new QueryEvent (getEmpTable (),
    queryDescriptor));
    }

    Thank you

    Nitesh

  • It does not work when you use the trigger to check the data of the other table.

    Please help me with this, I put a trigger on a table, but it can not work as I expect.

    case study: a class has many students, one of them is going to match.
    The purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to.
    Oracle version is 10.2.0.1.0.
    --table:
    DROP TABLE STU;
    DROP TABLE CLASS;
    
    create table CLASS(
    CID     VARCHAR2(5)   PRIMARY KEY,
    CNAME   VARCHAR2(20)  NOT NULL,
    SCHOSEN VARCHAR2(5));
     
    create table STU(
    SID     VARCHAR2(5)   PRIMARY KEY,
    SNAME   VARCHAR2(20)  NOT NULL,
    CID     VARCHAR2(5)   NOT NULL REFERENCES CLASS(CID) ON DELETE CASCADE);
    
    --data:
    --CLASS
    INSERT INTO CLASS(CID,CNAME) VALUES(1,'SUN');
    INSERT INTO CLASS(CID,CNAME) VALUES(2,'MOON');
    INSERT INTO CLASS(CID,CNAME) VALUES(3,'EARTH');
    --STU
    INSERT INTO STU VALUES(1,'JACK',1);
    INSERT INTO STU VALUES(2,'TOM',1);
    INSERT INTO STU VALUES(3,'LILY',2);
    INSERT INTO STU VALUES(4,'DUSTIN',3);
    
    --TRIGGER
    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    
    DECLARE
    DUMMY INTEGER;
    INVALID_STU EXCEPTION;
    VALID_STU EXCEPTION;
    MUTATING_TABLE EXCEPTION;
    PRAGMA EXCEPTION_INIT(MUTATING_TABLE, -4091);
    
    CURSOR DUMMY_CURSOR (ST VARCHAR2, CL VARCHAR2) IS
      SELECT SID FROM STU, CLASS
      WHERE STU.SID=ST AND STU.CID=CLASS.CID AND CLASS.CID=CL
        FOR UPDATE OF CLASS.SCHOSEN;
    
    BEGIN
      OPEN DUMMY_CURSOR(:NEW.SCHOSEN, :NEW.CID);
      FETCH DUMMY_CURSOR INTO DUMMY;
      IF DUMMY_CURSOR%NOTFOUND THEN
        RAISE INVALID_STU;
      ELSE
        RAISE VALID_STU;
      END IF;
      CLOSE DUMMY_CURSOR;
    EXCEPTION
      WHEN INVALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('PLEASE RE-ENTER CLASS ID AND STUDENT ID AS CLASS OR STUDENT IS NOT VALID.');
      WHEN VALID_STU THEN
        CLOSE DUMMY_CURSOR;
        DBMS_OUTPUT.PUT_LINE('STUDENT CHOOSE SUCCEFULLY!');
      WHEN MUTATING_TABLE THEN
        NULL;
    END;
    /
    Just copy and paste on it and try to run next:
    UPDATE CLASS
    SET SCHOSEN = 3
    WHERE CID = 1;
    Clearly, you can't student who is 3 as to Member of class 1. Please help me. Thank you.

    Published by: 991096 on March 1st, 2013 02:36

    Published by: 991096 on March 1st, 2013 03:03

    Published by: 991096 on March 1st, 2013 03:11

    Hello

    991096 wrote:
    1. the purpose of this trigger is to check when to choose a student going to match, this student has in his class where it belongs to. Then, when I try to choose 3 student-member of correspondence of class 1, should give me "PLEASE RE-ENTER ID AND STUDENT ID AS CLASS or STUDENT not IS NOT VALID."

    Then do something like this:

    CREATE OR REPLACE TRIGGER CHECK_SCHOSEN
    BEFORE INSERT OR UPDATE OF SCHOSEN ON CLASS
    FOR EACH ROW WHEN (NEW.SCHOSEN IS NOT NULL)
    DECLARE
        sid_found     stu.sid%TYPE;
    BEGIN
        dbms_output.put_line (:NEW.schosen || ' = schosen entering check_schosen');             SELECT  sid
             INTO    sid_found
         FROM      stu
         WHERE     sid     = :NEW.schosen
         AND     cid     = :NEW.cid
         AND     ROWNUM     = 1     -- to avoid TOO_MANY_ROWS
         ;
    EXCEPTION
        WHEN  NO_DATA_FOUND
        THEN
         RAISE_APPLICATION_ERROR ( -20000
                        , 'Please re-enter class id and student id as class ('
                          || :NEW.cid
                          || ') or student ('
                          || :NEW.schosen
                          || ') is not valid.'
                        );
    end;
    /
    

    DBMS_OUTPUT creates only a message. The message may not be displayed, and if this is the case, then the user cannot see it. The DML will still take place.
    I used instead, RAISE_APPLICATION_ERROR to keep the DML does not happen. It displays a message like

    ORA-20000: Please re-enter class id and student id as class (1) or student (3) is not valid.
    

    ' 2 ' game ' means ' an official competition in which two several people or teams competing.

    What individuals or teams are competing in this case?
    In any case, the question wasn't 'that 'game' means', but

    Frank Kulash wrote:
    What do you mean when you say "going to match?

    I think that now you're saying that the new values of (class.cid, class.schosen) must be equal to (or "fit") some existing (stu.cid, stu.sid).

    3. thanks for your tip, I learned how to use '{code} '.

    4. it's really goes with the exception of MUTATING_TABLE. So, how do to fix the trigger to show me INVALID_STU EXCEPTION when I try to choose a student does not belong
    a class?

    Don't refer to the table of class in the trigger, and the error table mutation occur. All the information you need are in the stu table, so there is no need to query the table of class, anyway.

  • Create the flat file data from the oracle table

    d_adp_num char (10)
    d_schd_date tank (8)
    d_sched_code tank (25)
    d_pay_code char (50)
    d_mil_start char (4)
    d_mil_end char (4)
    d_duration char (5)
    d_site_code char (4)
    d_dept_id tank (6)

    Select payroll_id,
    schedule_date,
    reason_code, (sched_code)
    reason_code, (pay_code)
    start_time,
    end_time,
    total_hours,
    site_code,
    department_id
    of dept_staff
    where schedule_date between (sysdate + 1) and (sysdate + 90)


    loading data for the date range instead.
    sched_code - if 'Unavailable' reason_code = 'OD' and 'THE '.

    pay_code - "Berevevement BD" If reason_code = "BD".
    "UP PTO without reasonable excuse" If reason_code = 'UP '.
    "RG" If reason_code = "SH".
    "PTO" If reason_code = "GO".
    Here are some...

    start_time and end_time - convert military time
    based on start_ampm and end_ampm

    On this basis, I need help to create a flat file. Sewing of the flat and data file in dept_staff sample

    If site_code is there so no need to get department_id (see the sample flat file)
    ------------------------------------

    examples of data to flat file

    ZZW002324006072012 PTO
    0800160008.00
    ZZW002428106072012 RG
    1015174507.50HM34
    ZZW002391606072012 RG
    1100193008.50
    ZZW002430406072012 RG
    1100193008.50 130000
    ----------------------------

    dept_staff table data

    REASON_CODE_1 PAYROLL_ID SCHEDULE_DATE REASON_CODE START_TIME, END_TIME START_AMPM END_AMPM TOTAL_HOURS SITE_CODE DEPARTMENT_ID
    ZZW0024468 08/06/2012 HS HS 730 HAS 400 850 12 P
    ZZW0000199 08/06/2012 HS HS 730 HAS 400 850 14 P
    ZZW0023551 08/06/2012 SH SH 1145 A 930 975 GH08 95 P
    ZZW0024460 08/06/2012 SH SH 515 HAS 330 P 1025 GH08 95
    ZZW0023787 08/06/2012 SH SH 630 HAS 300 850 24 P
    ZZW0024595 08/06/2012 TR TR 730 HAS 400 850 90 P
    ZZW0023516 08/06/2012 OD OD 800 HAS 400 800 95 P
    ZZW0023784 08/06/2012 OD OD 800 HAS 400 800 5 P
    ZZW0024445 08/06/2012 SH SH 1145 A GH08 930 975 5 P
    ZZW0024525 08/06/2012 OD OD 800 HAS 400 800 23 P
    ZZW0024592 08/06/2012 TR TR 730 HAS 400 850 5 P
    ZZW0024509 08/06/2012 SH SH 95 MK21 830 HAS 330 P 700

    ZZW0023916 06/14/2012 SH SH 1100 A 850 27 730 P

    How to ask questions
    SQL and PL/SQL FAQ

    UTL_FILE allows to write the OS file

  • Inserting data in the PLSQL table

    Hello

    I'm trying to create a table of records and try to insert some data into it. But it is throwing error when compiling. Can someone help me solve the problem. My procedure is:



    create or replace
    procedure 'IL_BAL_CAL_PROC' is

    type il_bal_cal_acc_tab_rec is record (GID_NO VARCHAR2 (4), REG_CODE VARCHAR2 (2), VAC VARCHAR2 (10), BRANCH_CODE VARCHAR2 (4), CTL VARCHAR2 (4), OPEN_DT DATE, RECORD_STAT VARCHAR2 (1), CLOSE_DT DATE);
    type il_bal_cal_acc_tab_type is table of the il_bal_cal_acc_tab_rec;
    il_bal_cal_acc_tab il_bal_cal_acc_tab_type:=il_bal_cal_acc_tab_type();

    BEGIN

    -first approach
    insert into il_bal_cal_acc_tab values('12');


    --deuxieme approach
    / * Insert in il_bal_cal_acc_tab
    Select p_gidno,
    p_region,
    a.ACC,
    a.brncd,
    a.CCY,
    a.accopendt,
    a.record_stat,
    NULL as closdt
    stvws_cust_account_if a.,
    b stvws_branch_dates,
    sttms_account_class c,
    sttms_dda_maininfo d
    where a.acc = d.customer_account
    and a.brncd = b.branch_code
    and b.branch_code = d.branch_code
    and a.account_class = c.account_class
    and a.accopendt < trunc (to_date(b.today,'dd-mon-yy'), 'mm')
    and a.record_stat = 'O'
    and I'm c.dda_account_type <>'
    and a.auth_stat = 'A'
    and d.region_code = p_region
    Union
    Select p_gidno,
    p_region,
    a.ACC,
    a.brncd,
    a.CCY,
    a.accopendt,
    a.record_stat,
    c.closdt
    stvws_cust_account_if a.,
    b stvws_branch_dates,
    stvws_cust_ac_closure_if c,
    sttms_dda_maininfo d
    where a.acc = c.ac_no
    and c.ac_no = d.customer_account
    and a.brncd = b.branch_code
    and b.branch_code = c.branch_code
    and c.branch_code = d.branch_code
    and a.record_stat =' it
    and c.closdt > = trunc (b.today, 'mm')
    and d.region_code = p_region;
    commit; * /

    END;


    Please tell me how to insert data into tables of this kind?

    I generally do like this

    CREATE OR REPLACE PROCEDURE "IL_BAL_CAL_PROC"
    IS
       CURSOR cur_il_bal_cal_acc_tab_type
       IS
          SELECT p_gidno,
                 p_region,
                 a.acc,
                 a.brncd,
                 a.ccy,
                 a.accopendt,
                 a.record_stat,
                 NULL AS closdt
            FROM stvws_cust_account_if a,
                 stvws_branch_dates b,
                 sttms_account_class c,
                 sttms_dda_maininfo d
           WHERE     a.acc = d.customer_account
                 AND a.brncd = b.branch_code
                 AND b.branch_code = d.branch_code
                 AND a.account_class = c.account_class
                 AND a.accopendt < TRUNC (TO_DATE (b.today, 'dd-mon-yy'), 'mm')
                 AND a.record_stat = 'O'
                 AND c.dda_account_type <> 'M'
                 AND a.auth_stat = 'A'
                 AND d.region_code = p_region
          UNION
          SELECT p_gidno,
                 p_region,
                 a.acc,
                 a.brncd,
                 a.ccy,
                 a.accopendt,
                 a.record_stat,
                 c.closdt
            FROM stvws_cust_account_if a,
                 stvws_branch_dates b,
                 stvws_cust_ac_closure_if c,
                 sttms_dda_maininfo d
           WHERE     a.acc = c.ac_no
                 AND c.ac_no = d.customer_account
                 AND a.brncd = b.branch_code
                 AND b.branch_code = c.branch_code
                 AND c.branch_code = d.branch_code
                 AND a.record_stat = 'C'
                 AND c.closdt >= TRUNC (b.today, 'mm')
                 AND d.region_code = p_region;
    
       TYPE il_bal_cal_acc_tab_type IS TABLE OF cur_il_bal_cal_acc_tab_type%ROWTYPE
                                          INDEX BY BINARY_INTEGER;
    
       il_bal_cal_acc_tab   il_bal_cal_acc_tab_type;
    BEGIN
       OPEN cur_il_bal_cal_acc_tab_type;
    
       FETCH cur_il_bal_cal_acc_tab_type
       BULK COLLECT INTO il_bal_cal_acc_tab;
    
       CLOSE cur_il_bal_cal_acc_tab_type;
    END;
    
  • My procedure is not load data in the specified table

    Hi friends,
    I get the data in a table and try to insert into a temporary table...
    now when I run the following procedure, it is not copying the elements of the table in the table of tepm...
    I can only copy the sequence and "NP' I've hard coded...

    ----------------------------
    create or replace package body is asg_change
    procedure p1 (p_err_buf out VARCHAR2
    some p_ret_code number)
    is
    v_asg_no varchar2 (30);
    v_per_id number (30);
    date of v_eff_st_dt;
    date of v_eff_end_dt;
    v_org_name varchar2 (100);
    v_err_mesg varchar2 (1000);

    cursor c1 is
    (SELECT paaf.assignment_number, paaf.person_id
    paaf.effective_start_date
    paaf.effective_end_date
    hr_general.decode_organization (paaf.organization_id)
    OrganizationName
    in v_asg_no, v_per_id, v_eff_st_dt, v_eff_end_dt, v_org_name
    BY the ADP per_all_assignments_f
    WHERE THERE ARE
    (SELECT 1
    OF per_all_assignments_f paafi
    WHERE the NVL (paafi.organization_id, 0)! =
    NVL (paaf.organization_id, 0)
    AND BETWEEN paafi.effective_start_date (paaf.effective_start_date - 1).
    AND paafi.effective_end_date
    AND paafi.assignment_id = paaf.assignment_id)
    );
    Start
    for rec loop c1
    insert into org_change values(xxkdd_asg_seq.nextval,'NP',v_org_name,v_eff_st_dt,v_per_id,v_asg_no);
    end loop;
    EXCEPTION
    WHILE OTHERS THEN
    v_err_mesg: = v_err_mesg |' | ' || 'Error, go look for the details of the assignment' | TO_CHAR (SQLCODE) | » -'|| SQLERRM;
    end;
    end;
    ---------------------------------------------------
    It's the temporary table, I created

    create table org_change (sl_no number (10), status varchar2 (100), nom_org)
    VARCHAR2 (100), the date of FFECTIVE_START_DATE, person_id number (10), assignment_number varchar2 (30))
    ---------------------------------------------------
    This is the insert statement

    insert into org_change values(xxkdd_asg_seq.nextval,'NP',v_org_name,v_eff_st_dt,v_per_id,v_asg_no);

    am I right giving it pls let me know

    There are 609 selected lines and am able to see 609 temporary table rows of data in the columns of the third column

    Thank you

    Published by: 776317 on April 11, 2011 16:13

    Published by: 776317 on April 11, 2011 16:14

    I suggest you to go through this link on how to write the pl/sql block.

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/TOC.htm

    http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/sqloperations.htm#sthref1273

    For your question it could be rewritten as follows:

    create or replace package body asg_change
    is
      procedure p1...
      is
      ....
      begin
      ....
       insert into org_change
      (
        sl_no, status, org_name, effective_start_date, person_id, assignment_number
      )
      SELECT xxkdd_asg_seq.nextval, 'NP' status, hr_general.decode_organization (paaf.organization_id) organization_name, paaf.effective_start_date, paaf.person_id, paaf.assignment_number
      FROM per_all_assignments_f paaf
      WHERE EXISTS
      (
         SELECT 1 FROM per_all_assignments_f paafi
         WHERE NVL (paafi.organization_id, 0) != NVL (paaf.organization_id, 0)
             AND (paaf.effective_start_date- 1) BETWEEN paafi.effective_start_date AND paafi.effective_end_date
             AND paafi.assignment_id = paaf.assignment_id
      ) ;
     end p1
    end asg_change;
    

    Also check this post.

    http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:47458244605081

    Key excerpts from the post above

    Tom-- I subscribe to your SQL mantra for data (and truly, is there anything else? :))
    which is:
    
    1. Do it in a single SQL statement if at all possible.
    2. If you cannot, then do it in PL/SQL (as little PL/SQL as possible!).
    3. If you cannot do it in PL/SQL, try a Java Stored Procedure
    (extremely rarely necessary with Oracle9i and above.)
    4. If you cannot do it in Java, do it in a C external procedure.
    (when raw speed, or 3rd party API written in C is needed.)
    5. If you cannot do it in a C external routine, you might want to seriously think
    about why it is you need to do it...
    

    I hope this helps.

    Concerning

    REDA

Maybe you are looking for

  • Portege Z930 - 10 p - ERROR recovery media: F3-F100-0008

    Hello I used Toshiba Recovery Media Creator to create 2 recovery media on a USB for my Z930 flash drive - 10 p. Then I removed all partitions on SSD computers. The problem is that the recovery process will not work. In this case: 1 "Windows is loadin

  • I get no ring on certain messages

    I get a message but no warning sound from one of my contacts. Other messages have a sound alert. Is there something in the settings to correct this?

  • HP - 14 r-226TX: Disk Fragmentation

    I have used avg antivirus and this is what makes that your hard drive is fragmented and it will slow down your pc and requires disk defragmentation. I don't know what it is, should I do it or not and if I do it really does speed up my pc and what sof

  • Cluster for the FPGA reference constraint

    I have a cluster of clusters.  One of the internal piles went 25-29 items, but I forgot to update several of my Subvi reflect.  I remember before when I did, I got a broken line not executable VI, but now the result is a constraint.  You can really f

  • SystemToast onTriggered?

    Hi, how I trigger something when you press a button on SystemToast? I don't know how to say. Anythought please? SystemToast * toast = new SystemToast (0); Toast-> setBody ("Success.");Toast-> button()-> setLabel ("Ok");Toast-> show();