Having a Plsql table problem

HII all... .i want to Know is it possible to give a table plsql as mode setting of output to another procedure... because if I do, I get an error "PLS-00201: identifier 'EMPTYPE' must be declared" I have creatred an emptype plsql table here is my code "»

create or replace procedure emp_pro (v_data in varchar2, v_empout out varchar2)

is

type emprectype is record

(

V_empno emp.empno%type,

v_ename emp.ename%type,

v_sal emp.sal%type,

v_job emp.job%type,

v_hiredate emp.hiredate%type,

v_comm emp.comm%type,

v_deptno emp.deptno%type

);

is of type emptype table of the emprectype

index of directory;

I have directory: = 0;

v_data varchar2 (1000): =' | 7369, SMITH, 800, CLERK, 17-DEC-80, 0: 20 | 7499, ALLEN, 1600, SELLER, 20-FEB-81 300, 30. 7521, WARD, 1250, SELLER, 22-FEB-81 500, 30. 7566, JONES, 2975, MANAGER, 02-APR-81, 0: 20 | 7654, MARTIN, 1250, SELLER, 28-SEP-91 100, 30. 7839, KING, 5000, PRESIDENT, 17-NOV-81, 0, 10. 7844, TURNER, 1500, SELLER, 08-SEP-81, 0: 30 | 7876, ADAMS, 1100, CLERK, 23-MAY-87, 0: 20 | 7900, JAMES, 950, CLERK, 03-DEC-81, 0: 30 | 7902, FORD, 3000, ANALYST, 03-DEC-81, 0: 20 | 7934, MILLER, 1300, CLERK, 23-JAN-82, 0: 10 |';

v_record varchar2 (100);

number of v_num1;

number of v_num2;

number of v_num3;

i the number;

number of j;

Meter number;

Start

Counter:=length(v_data)-length(Replace(v_data,'||')).

i: = 1;

loop

v_num1: = instr (v_data,'|) (', 1, i) + 2;

v_num2: = instr(v_data,'||',1,i+1)-2;

v_num3: = (InStr(v_data,'||',1,i+1))-(InStr(v_data,'||',1,i) + 2);

i: = i + 1;

v_record: = substr (v_data, v_num1, v_num3);

exit when I = counter + 1;

v_empout: = v_record;

-dbms_output.put_line (v_record);

end loop;

end emp_pro;

/

The type that you created is local to the procedure and is valid within this procedure.

To use the same type between procedures, you create a type that is visible in both procedures, for example by creating a type in the header of a packet.

Tags: Database

Similar Questions

  • Changing aid necessary table problem

    Hello. I hope someone can help me with this problem.

    I have two tables, an and mv. Create the following script:

    create table (mv)
    the moduleId Char (2) CONSTRAINT ck_moduleId CHECK (moduleId in ("M1", "M2", "M3", "M4', 'M5', 'M6', 'M7', 'M8'")).
    credit ck_credits Number (2) CONSTRAINT CHECK (credits (10, 20, 40));
    constraint pk_mv primary key (moduleId)
    );

    create table (its)
    stuId Char (2) CONSTRAINT ck_stuId CHECK (stuId ('S1', 'S2', 'S3', 'S4', 'S5')),
    moduleId tank (2),
    primary key constraint (stuId, moduleId) pk_sa,
    constraint fk_moduleid foreign key (moduleId) references (moduleId) mv
    );

    And the scripts below is to insert data into the two:

    insert into VALUES mv ("M1", 20)
    /
    insert into VALUES mv ("M2", 20)
    /
    insert into VALUES mv ("M3", 20)
    /
    insert into VALUES mv ("M4", 20)
    /
    Insert in mv VALUES ('M5', 40)
    /
    insert into VALUES mv ("M6", 10)
    /
    insert into VALUES mv ("M7", 10)
    /
    Insert in mv VALUES ('M8', 20)
    /


    insert into a VALUES ('S1', 'M1')
    /
    insert into a VALUES ('S1', 'M2')
    /
    insert into a VALUES ('S1', 'M3')
    /
    insert into a VALUES ('S2', 'M2')
    /
    insert into a VALUES ('S2', 'M4')
    /
    insert into a VALUES ('S2', 'M5')
    /
    insert into a VALUES ('S3', 'M1')
    /
    insert into a VALUES ('S3', 'M6')
    /

    Now for the real problems.

    First of all, I need to try to overcome the problem of table mutation ensure that stuid = S1 in table its can not take the two moduleId M5 and M6.

    Just one or the other. I created a single trigger, but runs aground because of the changing table problem.

    The second problem that I need to overcome is that none of the stuids can have the ModuleID where total value of more than 120 credit credits. Credit value is stored in the table of mv.

    Thank you very much in advance for any help.

    Use a statement-level trigger:

    First of all, I need to try to overcome the problem of table mutation ensure that stuid = S1 in table its can not take the two moduleId M5 and M6.

    SQL> create or replace trigger sa_trg
      2  after insert or update on sa
      3  declare
      4  c number;
      5  begin
      6    select count(distinct moduleId) into c
      7    from sa
      8    where stuid = 'S1'
      9    and moduleId in ('M5','M6');
     10    if c > 1 then
     11       raise_application_error(-20001,'S1 on both M5 and M6!!');
     12    end if;
     13  end;
     14  /
    
    Trigger created.
    
    SQL> select * from sa;
    
    ST MO
    -- --
    S1 M1
    S1 M2
    S1 M3
    S2 M2
    S2 M4
    S2 M5
    S3 M1
    S3 M6
    
    8 rows selected.
    
    SQL> insert into sa values ('S1','M5');
    
    1 row created.
    
    SQL> insert into sa values ('S1','M6');
    insert into sa values ('S1','M6')
    *
    ERROR at line 1:
    ORA-20001: S1 on both M5 and M6!!
    ORA-06512: at "SCOTT.SA_TRG", line 9
    ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'
    

    The second problem that I need to overcome is that none of the stuids can have the ModuleID where total value of more than 120 credit credits. Credit value is stored in the table of mv

    SQL> create or replace trigger sa_trg
      2  after insert or update on sa
      3  declare
      4  c number;
      5  begin
      6    select count(distinct moduleId) into c
      7    from sa
      8    where stuid = 'S1'
      9    and moduleId in ('M5','M6');
     10    if c > 1 then
     11       raise_application_error(-20001,'S1 on both M5 and M6!!');
     12    end if;
     13
     14    select count(*) into c from (
     15    select stuid
     16    from mv, sa
     17    where sa.moduleid=mv.moduleid
     18    group by stuid
     19    having sum(credits)>120);
     20
     21    if c > 0 then
     22       raise_application_error(-20002,'A student cannot have more than 120 credits!!');
     23    end if;
     24
     25  end;
     26  /
    
    Trigger created.
    
    SQL>   select stuid, sum(credits)
      2  from mv, sa
      3  where sa.moduleid=mv.moduleid
      4  group by stuid;
    
    ST SUM(CREDITS)
    -- ------------
    S3           30
    S2           80
    S1          100
    
    SQL> insert into sa
      2  values ('S1','M4');
    
    1 row created.
    
    SQL>   select stuid, sum(credits)
      2  from mv, sa
      3  where sa.moduleid=mv.moduleid
      4  group by stuid;
    
    ST SUM(CREDITS)
    -- ------------
    S3           30
    S2           80
    S1          120
    
    SQL> insert into sa
      2  values ('S1','M7');
    insert into sa
    *
    ERROR at line 1:
    ORA-20002: A student cannot have more than 120 credits!!
    ORA-06512: at "SCOTT.SA_TRG", line 20
    ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'
    

    Max
    http://oracleitalia.WordPress.com

  • I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a

    I'm having a lot of problems with firefox and cannot figure out how to get help. It all started when I updated to 13. I get all kinds of advertising popups, I can't play a game on FaceBook called Farm Town at all, and I get a popup of AVG on the cookies that I can't get rid of. These issues are causing me to use Chrome quite often, although I like Fox better. I've searched and searched how to get help and find nothing. How can I get personalized technical help? These problems will not occur in Chrome at all. Thank you.

    Do a check with some malware malware, analysis of programs on the Windows computer.

    You need to scan with all programs, because each program detects a different malicious program.

    Make sure that you update each program to get the latest version of their databases before scanning.

    Alternatively, you can write a check for an infection rootkit TDSSKiller.

    See also:

  • I just downloaded the new DC Acrobat, and I'm having a lot of problems with it. It's very, very slow. He has opening, saving, closing, do anything. Is there something that can be done to help him run a little more, well, normally?

    I just downloaded the new DC Acrobat, and I'm having a lot of problems with it. It's very, very slow. He has opening, saving, closing, do anything. Is there something that can be done to help him run a little more, well, normally?

    I fixed it! I used the string analyze function waiting in the Task Manager while opening a PDF file and have to wait 12 seconds... and it showed that the wait chain has been blocked by the Speech SDK. So I went to my Plugins of PDF from Adobe folder, which in my case is C:\Program Files (x 86) \Adobe\Acrobat DC\Acrobat\plug_ins and delete the plugin ReadOutLoud.api. (I had to close all instances of Acrobat DC first, and I had to also click the UAC Popup Windows application approval raised to remove the plugin) Now... instant Adobe Acrobat DC charge!

  • How to recover data from plsql table in the BI publisher data model

    Hi all

    I created a data model for XML editor report. In the data model I m get plsql table data. for this I created a package with a function in the pipeline. I am able to run sql in sql developer. But if I run the program at the same time, then I got error like "java.sql.SQLSyntaxErrorException: ORA-00904:"XXXXX": invalid identifier.

    I used the same settings in the data model and simultaneous program...

    Please tell me what to do...

    Thanks in advance...

    Kind regards
    Doss

    I think P_ORG_ID is the parameter
    so use

    :P_ORG_ID
    

    -Add
    also why not use simple sql query?

    Published by: Alexandr Sep 14, 2012 04:48

  • Inserting blob in a table: problems

    I wanted to insert a picture into the database using PLSQL table. Please let me know if the image file must be on a database server or I can insert it premises as well. Please find below my code and the error I get.

    Call to the procedure and the error
    BEGIN
    load_blob_from_file
    ( 'D:\PRoJeCt-RS\OracleError', 'item', 'item_blob',  'id', '2');
    END;
    
    BEGIN
    *
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    ORA-06512: at "SYS.DBMS_LOB", line 504
    ORA-06512: at "CMSRTPGM.LOAD_BLOB_FROM_FILE", line 18
    ORA-06512: at line 2
    My procedure to insert data into the table
    CREATE OR REPLACE PROCEDURE load_blob_from_file
    ( src_file_name     IN VARCHAR2
    , table_name        IN VARCHAR2
    , column_name       IN VARCHAR2
    , primary_key_name  IN VARCHAR2
    , primary_key_value IN VARCHAR2 ) IS
      -- Define local variables for DBMS_LOB.LOADCLOBFROMFILE procedure.
      des_blob      BLOB;
      src_blob      BFILE := BFILENAME('GENERIC',src_file_name);
      des_offset    NUMBER := 1;
      src_offset    NUMBER := 1;
      -- Define a pre-reading size.
      src_blob_size NUMBER;
      -- Define local variable for Native Dynamic SQL.
      stmt VARCHAR2(2000);
    BEGIN
      -- Opening source file is a mandatory operation.
      IF dbms_lob.fileexists(src_blob) = 1 AND NOT dbms_lob.isopen(src_blob) = 1 THEN
        src_blob_size := dbms_lob.getlength(src_blob);
        dbms_lob.open(src_blob,DBMS_LOB.LOB_READONLY);
      END IF;
      -- Assign dynamic string to statement.  -- We are going to obtain the clob locator (pointer) to use later 
      stmt := 'UPDATE '||table_name||' '
           || 'SET    '||column_name||' = empty_blob() '
           || 'WHERE  '||primary_key_name||' = '||''''||primary_key_value||''' '
           || 'RETURNING '||column_name||' INTO :locator';
      -- Run dynamic statement.  -- the locator (pointer) to the blob will assigned to des_blob   
      EXECUTE IMMEDIATE stmt USING OUT des_blob;
      -- Read and write file to BLOB, close source file and commit.
      dbms_lob.loadblobfromfile( dest_lob     => des_blob
                               , src_bfile    => src_blob
                               , amount       => dbms_lob.getlength(src_blob)
                               , dest_offset  => des_offset
                               , src_offset   => src_offset );
      -- Close open source file.
      dbms_lob.close(src_blob);
      -- Commit write and conditionally acknowledge it.
      IF src_blob_size = dbms_lob.getlength(des_blob) THEN
        $IF $$DEBUG = 1 $THEN
          dbms_output.put_line('Success!');
        $END
        ROLLBACK;
      ELSE
        $IF $$DEBUG = 1 $THEN
          dbms_output.put_line('Failure.');
        $END
        RAISE dbms_lob.operation_failed;
      END IF;
    END load_blob_from_file;
    The table structure
    CREATE TABLE ITEM
       (     "ID" NUMBER, 
         "TITLE" VARCHAR2(50), 
         "ITEM_BLOB" BLOB
       )
    Thanks in advance!
    Concerning
    34MCA2K2

    Published by: BluShadow on June 14, 2012 13:31
    addition of {noformat}
    {noformat} tags for readability.  Please read {message:id=9360002} and learn to do this yourself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Yes,

    Start by creating an object directory point to a physical directory on the server database as the 'oracle '.
    user has read/write permissions.

    CONN / AS SYSDBA
    CREATE or REPLACE DIRECTORY nom_repertoire as 'D:\Applications ';
    GRANT READ, WRITE ON DIRECTORY NOM_REPERTOIRE TO USER_NAME;

    Here is the diagram user USER_NAME.

    Then,.
    create and populate a table to contain the images in the database your user to user schema.

    and try this procedure...

    DECLARE
      l_dir    VARCHAR2(10) := 'DIR_NAME';   ----> Is the Directory Object we created.
      l_file   VARCHAR2(20) := 'site_logo.gif';   ----- > The image to be located in the DB Server in the Directory Path DIR_NAME mentioned.
      l_bfile  BFILE;
      l_blob   BLOB;
    BEGIN
      INSERT INTO images (id, name, image)
      VALUES (images_seq.NEXTVAL, l_file, empty_blob())
      RETURN image INTO l_blob;
    
      l_bfile := BFILENAME(l_dir, l_file);
      DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
      DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile));
      DBMS_LOB.fileclose(l_bfile);
    
      COMMIT;
    END;
    

    Thank you
    Shankar

  • How to get an output of a plsql table?

    Hi Experts,
    I have a package which, once executed gets data in a plsql table.
    I want to store these data in a custom table.
    How can I do this?

    Thank you
    PS

    This?

    SQL> create table temp
      2  as
      3     select * from emp where 1 = 2
      4  /
    
    Table created.
    
    SQL> define p_empno=7788
    SQL>
    SQL> declare
      2     type emp_record is table of emp%rowtype;
      3
      4     emp_rec        emp_record;
      5  begin
      6     select * bulk collect into emp_rec from emp where empno = &p_empno;
      7     for i in 1 ..emp_rec.count loop
      8      insert into temp values emp_rec(i);
      9     end loop;
     10  end;
     11  /
    old   6:    select * bulk collect into emp_rec from emp where empno = &p_empno;
    new   6:    select * bulk collect into emp_rec from emp where empno = 7788;
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> select empno, ename from temp
      2  /
    
         EMPNO ENAME
    ---------- ----------
          7788 SCOTT
    
  • remove the last record from the plsql table

    TYPE r_LOOPElement IS RECORD (TermID   NUMBER 
                                          );
    
    TYPE t_LOOPType IS TABLE OF r_LOOPElement INDEX BY BINARY_INTEGER;
    i_CustomerLoop      t_LOOPType ;
    
    i_CustomerLoop(1).TermID=1;
    i_CustomerLoop(2).TermID=2;
    i_CustomerLoop(3).TermID=3;
    Under certain conditions, I need to remove the last record from i_CustomerLoop

    whichi s the best way to do it. because I sometimes get duplicates for TermID in this plsql table.

    Hello

    See [removing items from Collection (DELETE method) | http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28370/collections.htm#CJAFGFIG]

    Kind regards

  • PLSQL table that is based on a subquery

    Hi friends,

    I would like to declare plsql table that is based on a subquery. pls share your comments.

    FOR EXAMPLE...

    Declare
    Type tab_rec is table of the (select ename, sal, deptno from emp);
    v_tab tab_rec;
    Begin
    / * declarations * /;

    End;

    Thank you
    Raj.

    Probably like a little more

    declare
       cursor cur_rec is
         select ename, sal, deptno from emp;
    
       type tab_rec is table of cur_rec%rowtype;
       v_tab tab_rec;
    begin
      ...
    end;
    

    If we stick to the variable naming conventions of OP. ;)

  • Windows xp routing table problem

    I'm having a problem with windows routing tables on the pc at my workplace.
    These computers are running windows xp sp3 and the problem occurs when I change the default gateway

    the PCs are on subnet 10.181.1.0/24 with d/g 10.181.1.11.
    with this configuration, the routing on each pc table works as expected [for example, it stores a
    Directions to its own subnet [10.181.1.0/24] but no way to other subnets [for example, it will not store
    a road to 10.180.1.0/24, it will simply send this default network traffic
    gateway].

    However, due to a re-design network, I need to change the default gateway for this lan
    to 10.181.1.254. When I do cela something strange happens. the windows routing table on
    each pc begins to store routes to the entire 10.0.0.0/8 network, even if the current
    config on the pc is still a 24 network [for example, 10.181.1.21/24, d/g 10.181.1.254].
    its as if when I change default gateway from the computer, windows, pleasures of the routing table of the
    10.181.1.0/24 subnet as if it were a network 10.0.0.0/8 classful.

    While, right? I can still connect to other networks, the pc is just using a route
    stored in its routing table local instead of sending traffic to its default gateway.
    The problem is that we have a 10.181.1.12 default backup gateway that we switch to
    If the primary gateway goes down. When we test failover to 10.181.1.12 pcs are always
    Send non-local traffic to 10.181.1.11 [because they still have these routes stored locally in their]
    Windows routing tables]. I want to send traffic to 10.181.1.254 [switch a core of layer 3, which then]
    two lanes of traffic to 10.181.1.11 or. [12]

    I tried to change the default gateway to a range of ip addresses and the same problem occurs every time.
    I rebooted each pc after having changed its d/g and the problem remains the same. I tried
    delete all the information off the power the pc ip address, then re-enter with the new d/g, then restart
    the pc but the problem remains the same.

    so, to summarize, when I change the d/g from any pc on the 10.181.1.0/24 subnet, computers table routing begins to store routes
    in its local routing table to the classful, instead of just the classless 10.181.1.0/24 network 10.0.0.0/8 network.

    Has anyone encountered this before?

    Hi biglouie2010,

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows XP forum.

    http://social.technet.Microsoft.com/forums/en/itproxpsp/threads

  • Spry dynamic dataset table problem

    We are running in a quirk of Spry that we can't seem to make it work.

    When we create a data set of an XML file on the web server, a Spry table using this dataset displays correctly and is as it should be. But when we create the same group of XML data from a php/asp script on the web server, the Spry table flashes the model for a fraction of a second, and then deletes them. Web pages that contain the data sets are identical except for the source used by Spry.Data.XMLDataSet. No matter where he gets to it, the XML is identical. The XML file that we use has been generated by recording the output of the php/ASP script. The XML source file works, but the source script does not work.

    Example code:
    XML source: (this is generated by st.php and saved in st.xml, model based on DW CS3 Spry documentation)

    <? XML version = "1.0" encoding = "utf-8"? >
    <>sets
    < Game >
    < user_id > ZZZZ < / user_id >
    < grp_id > ABCD < / grp_id >
    < / set >
    < Game >
    < user_id > ZZZZ < / user_id >
    < grp_id > EFGH < / grp_id >
    < / set >
    < / sets >

    HTML: (here, everything is generated as DW CS3 has created, starting a new html file)

    <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional / / IN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
    "" < html xmlns = " http://www.w3.org/1999/xhtml ' xmlns: spry ="http: /ns.adobe.com/spry">
    < head >
    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"
    < title > Untitled Document < /title >
    < script src = "SpryAssets/xpath.js" type = "text/javascript" > < / script > "
    < script src = "SpryAssets/SpryData.js" type = "text/javascript" > < / script > "
    < script type = "text/javascript" >
    var DS1 = new Spry.Data.XMLDataSet ("st.php", "sets/set");
    < /script >
    < / head >
    < body >
    < div spry: region = "ds1" >
    < table >
    < b >
    user_id < th > < /th >
    < th > grp_id < /th >
    < /tr >
    < tr spry: repeat = "ds1" >
    < td > {user_id} < table >
    < td > {grp_id} < table >
    < /tr >
    < /table >
    < / div >
    < / body >
    < / html >

    -note: the "xmlns: spry" in the code above has an extra space between the slashes - I added that because the preview kept adding tags additional head in the middle of this address...

    The above html code uses "st.php" as a source for the dataset, and the only difference between the two tests is to change the source to 'st.xml '. I tried to look in all the documents that I can find, and the CS3 code corresponds to all the examples for the use of XML or a set of data source php/asp. Documentation seems to assume that it should simply work little matter that I use as a source as long as it outputs xml, which is what I do. I can check if the output itself works well because it made when registering in a direct xml file. Also, if I try to build the dataset schema, DW correctly interprets the output of the php script, exactly as it does when generating the schema from the xml file.

    We get this behavior if use us IIS, Apache, php, or asp, IE or Firefox. Obviously we are doing something wrong somewhere, but I can't find others with this problem, I can't find any options that could correct. Anyone has any ideas what could be the problem?

    "FSchwalm" wrote in message
    News:f1cq7h$KGM$1@forums. Macromedia.com...
    > Get us this behavior, if we use THE IIS, Apache, php, or asp, or
    > Firefox.
    > Obviously we're doing something wrong somewhere, but I can't find
    > other
    > having this problem, I can't find any options that could correct.
    > Everyone

    > have any ideas of what could be the problem?

    You must use the ASP/PHP code to configure the mime type of the XML file as
    "application/xml".

    --
    ----------------------------
    Massimo Foti, programmer web-rental
    Tools for ColdFusion and Dreamweaver developers:
    http://www.massimocorner.com
    ----------------------------

  • manipulation of the table problem

    I'm using Labview 2009 and I have a problem with windows... I have to implement the following code in Labview (X and digital input boards):

    for (i = 0 to MAX (X)) {}

    If (X [i] > (X [i-1] + 1)) {}

    X.Add (X [i], X [i-1] + 1) / / add the value X [i-1] + 1 x [i] position of the X table

    Y [i] = 0

    }

    on the other

    Y [i] = Y [i]

    }

    If I try to add items in the original array Y with the function 'Replace subset of table', the output array is not changed by the VI. If I try to initialize and to build a new table, I get a matrix of zeros. Can someone help me?

    If you want to just add 0 to the index that does not exist in X [] then try this.

  • MS Office report Express VI and table problem

    Hi all

    I have a strange problem with MS Office report VI, which is included with the report generation tool. I created an Excel template that I linked, according to the preference "Custom template for Excel" and all the named ranges. However, two of the named ranges that I entered are 1 d arrays of doubles. Now the problem:

    When I entered the berries to their specific name range (it's only 6 values), instead of simply enter the values in the table in the cells he entries like this:

    A value of 0

    1 value

    2 the value

    ...

    6 value

    He pushes the 'value' to the column next to the beach of name because of 0-6.

    He does it with two tables so it screws to the top of all formulas. Anyone know how to remove the 0-6 and simply enter the values?

    Thank you all

    The Express VI are easy and convenient, but some costs. Since the Express VI can also accept a waveform entry, you have to accept that it will add a channel name.

    With the tool report generation (who are also its limits), it's easy to add only the data you want:

    Ben64

  • simple table problem

    I have read some data from a text file and form a table according to my requirement (the illustrious photo attached).

    What my problem was when I used this table in an other vi through the connector components, all the lines in the resulting table the width of the line of maximum size, and are filled with zeros.

    How do I remove it? I need the lines ending with its own values, here in my case two first rows should have 5 items in the table, the elements of line 7 third and so on...

    Your VI makes no sense. Why not autoidenxing? Why "delete from table?

    Here's a simple possibility (just to write the resulting string in a file).

  • Table problems

    Hello OR Forums, I currently develping a VI to specify the tensions that will be send to the device that will run two mirrors. The idea and the configuration are pretty basic, but programming, it's a question. Matrices X and there are elements that correspond to a point located on a network of coordinates. For example, maybe my items in my grid for X [-2, - 1, 0, 1, 2] and my Y could be [-2, -2, -2, -2, -2]. However, the problem is that I need a larger value of X and Y for I could resign in the grid and reassemble in table X. For example, will be my next line of items [-2, - 1, 0, 1, 2] X and [-3, - 3, -3, -3, -3] for Y. However, how my program is written my last value of is less than the previous item. Thus, ideally I would form a table that would have an extra X element that corresponds to the step down in voltage on the axis Y. This would be ideal: [-2, - 1, 0, 1, 2, 2] x and [-3,-3,-3,-3,-3,-4] for y.

    Sorry for this question is a bit bad made. The application of this program is quite simple, but it seems to me a bit puzzled.

    If you want to start (start X, start) then continue to start X + step X, start. Continue (Start, X, Y). Then go to start X, Y + step start o and increment in X. Repeat for all the table again.

    Is that a correct understanding of what you want?

    If so, you can do this with a picture of the X values and an array of the values, or even with no tables at all.  Create a State with the States for Scan X machine, trace, and no matter what States are required for initialization and shutdown.  Have two shift registers to track the values X and Y or indexes. Whenever you increment X through the State X Scan. When X reaches the maximum value or the index reached the last X, change the State to trace. It increments Y and restores X X start or equivalent for the index. When you reach Max X and Y of Max, go to the State of clean shutdown or restart.

    No complicated manipulation table required.

    Lynn

Maybe you are looking for