Retrieve the index of a table with a value greater than zero

How is it possible to extract the indices of the elements above zero in a 2D array?

Example:

Table:

0 12 11 33 0

1 0 0 0 0

2 99 0 9 0

Need to get 12,11,33 table indexes and so on...

Nghtcrwlr,

Attached is the first thing that comes to mind.

Dan

Tags: NI Software

Similar Questions

  • GetLength errors on CLOB. Retrieves the size of a table with CLOB columns

    Hello

    I try to find the size of a CLOB to a table column and get the error

    PLS-00306: wrong number or types of arguments in the call to "GETLENGTH.

    When you try to use dbms_lob.getlength. Here is the code


    declare
    number num.
    Start
    for rec in (select xmlupload from FILE_TABLE where file_table_id = 33635) loop
    NUM: = dbms_lob.getLength (rec.xmlupload);
    end loop;
    dbms_output.put_line (num);
    end;

    Database version: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi


    I'm actually trying to find the size of a table with CLOB columns, is there an easy way to do this Besides using getlength and without having to contact the Administrators (they are outsourced)?

    It works fine on my computer, the version is also 10g.

    SQL> declare
      2  num number;
      3  begin
      4  for rec in (select cntnt from ims_toms_msge where rownum<3) loop
      5  num := dbms_lob.getLength(rec.cntnt);
      6  dbms_output.put_line(num);
      7  end loop;
      8
      9  end;
     10  /
    3837
    3837
    
    PL/SQL procedure successfully completed.
    

    You should check if xmlupload is the CLOB data type.
    In addition, if you just want to get the CLOB size, you can use LENGTH() as well, you will get the same result;

    SQL>  select length(cntnt), dbms_lob.getLength(cntnt) from ims_toms_msge where rownum<2;
    
    LENGTH(CNTNT) DBMS_LOB.GETLENGTH(CNTNT)
    ------------- -------------------------
             3837                      3837
    

    Published by: PhoenixBai on September 24, 2009 13:40

  • Replace the index of an array with strings values

    I have a control table 2D (or indicator) CH x T: each cell of the table contains the voltage check for channel and time represented by the respective row and column.

    I would like to be able to scroll the data showing the names and time values to the Index screen instead of numeric values.

    For example, instead of see 0,1,2,3 etc. as line index values, I would like to see channel 1, canal2, canal3 etc..

    Is - it somehow possible?

    Any idea is welcome!

    Thank you in advance!

    See you soon.

    MG

    If you want to display the data in the form of a 2D array, but use channel & time as the Index display, you can use the rings of text and structure of the event.  You can reduce the table view if you only want to display one value.

  • retrieve the information of partition table with lack of offline data file

    I just restored a backup of a database. When I unzipped data files, I discovered that a single data file was so damaged in the starting order of the database, I had to put the offline data file. The tablespace which reports the data file holds the information of partition of a table. Since I have no archives from when the data file has been created, I know it is not possible to recover the data file, I have to recover as many lines as possible other files in the tablespace data but when export or create the table as what to choose in the affected partition get ORA-00376 : cannot read file 1624 at the moment.

    is there a way to tell oracle to ignore the data offline file and export the remaining data file information?

    Just to clarify my situation a little more;
    iI have a table called PPGA_ACTABOPRE that is partitioned by HASH and has 20 partitions, each partition in a different tablespace and tablespace each have about 8 files of data. A data file in the partition 9 is missing and I want is to get the information from the files of the remaining data, but whenever I issue a select statement or an exp or anything I get ORA-00376.

    I try to set the flag to ignore blocks corrupt with run DBMS_REPAIR. SKIP_CORRUPT_BLOCKS ('PPGA', 'PPGA_ACTABOPRE'); and then select the info but it did not work.

    Any suggestion would be appreciated;
    Thanks in advance

    For the actabopre_p08 partition, some files are available, and we're not. You can access data at the segment level, because some extensions are missing.

    You would need to access the data by rowid. You could loop through dba_extents and use dbms_rowid.create to generate a list of ROWID that may exist in the available data files.

    This may help: -.

    http://kerryosborne.Oracle-guy.com/2009/02/saving-rows-from-corrupt-blocks/
    http://kerryosborne.Oracle-guy.com/scripts/save_u.SQL

    Published by: Robert Geier on March 12, 2010 15:33

  • Read byte with a value up to 127 lire byte with an ASCII value greater than 7F (127 dec)

    Hello

    I have to read a byte with a value greater than 127, Labview turn 27.

    In help I saw that Labview provides a description of ASCII that pour values ranging up to ' 127.

    What do I need to do?

    LabVIEW 6.1

    Windows XP

    Hello

    I want to read a byte with a maximum value of 127, but Labiew reurn arround 27 value

    How do I do?

    Rigid wrote:

    Thanks for your help. I'm not changing lyke I understand (my English is poor quiet...)

    I have another program that communicate with the instrument. I know byte (6) must be greater than 18 (greater than 7F actually).

    But with Labview, I'm only 18.

    While it might be higher than 18 x, an I8 is signed, and therefore it cannot be greater than x7F - it has a range of-128 to 127. A U8 is not signed, and it's why he has a range from 0 to xFF. However, x 18 is the same if you treat as signed or not signed. I don't see how LabVIEW can read a wrong value on the serial port. Are you sure you're looking at the correct byte? Your code shows that you split the chain twice. Are you sure that you do this properly?

    Given that you use on Windows you can recheck the chain received using PortMon. Allows you to see what is actually received by the driver for the serial port on Windows.

    P.S. I actually meant the whole byte function.

  • The sum of several text boxes that are greater than 1

    Hello

    Relatively new to javascript and need to get a script that calculates the sum of the ten boxes of text with a value higher than 1.

    I have a script for counting, I'm not sure how to do the sum. Script is below.

    I'm sure it's pretty simple, but I'm not versed in this right now.

    var total = 0;

    for (var i = 1; i < = 10; i ++) {}

    If (Number (this.getField("Text"+i).valueAsString) > 1) total ++;

    }

    Total = Event.Value;

    Any help would be appreciated.

    It summarizes a number of fields by simply adding the value of the field to the variable used to accumulate the numerical values of the fields to be summarized...

    var total = 0;

    for (var i = 1; i)<= 10;="" i++)="">

    If (this.getField("Text"_+_i).value > 1) total = total + Number (this.getField("Text"_+_i).value).

    }

    Total = Event.Value;

  • How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    How to connect to an Adobe Javascript(Folder Level Script) SAP Web Service and retrieve the response in a table of the Adobe Javascript/AcroJS. Could you please it explain with an example. I have two required input parameters that must be filled.

    I s generic SOAP example/tutorial on my blog: get a serial number in a form using SOAP - KHKonsulting LLC

    The web service uses only a single parameter, but you should be able to adapt the code to two arguments without problems.

  • How to check the Index is in harmony with the Table

    Hi, DBAS,.

    OS = RHEL 4
    DB = 10.2.0.4


    How do synchronize us the indexes on a table? Can synchronize us a clue? If an index is not having the same number of records in the table?

    Thank you
    Hari

    In fact, I see a different number of rows in table and an index on it.

    Select count (asset_id) in the rpt.vehicle; -table
    -Returns 23 345 lines

    Select count (1) in the rpt.vehicle_idx; -index
    -Returns 18 287 lines.

    You cannot select an index in this way so it is nonsense.

    If you really do:

    select count(1) from rpt.vehicle_idx;
    

    then VEHICLE_IDX is not an index.

    SELECT object_name, object_type FROM ALL_OBJECTS WHERE OWNER = 'RPT' AND OBJECT_NAME IN ('VEHICLE','VEHICLE_IDX')
    
  • get the index of a table display

    Hello!

    I have a question. Is it possible to get the index of a current table in the front panel?

    I have 2 tables which need to scrool simultaneously to the user, so my idea was to read the index of a table and 'write' on the second.

    Can someone give me an idea how to do that?

    Thank you

    Dear Thiago Bach,

    recently, I did (for a similar question) an example on the control to the index of the two tables and bar a scroll, please find the attached VI.

    Good luck!

  • How to get the title of a table with FDK?

    How to get the title of a table with ad FDK C++?

    I did people. I get objects table paragraph and later the textual elements for each of them.

  • Fill the table with random values

    Another thing I've come across is this:
    the table name is LOR, who has 3 fields NUMBER, DATA, TEXT with number, date and varchar2 data type.
    On a page, I have a text field where if I write 3, then it would add 3 lines to the table with predefined values ("number, something like 2222, for 12 January 09, and for text, something like" Lorem ipsum dolor sit amet, 195kgs adipisicing elit"). So basically, with the number that I give, it populates the table with lines... How can I do this? Thanks for helping me
    INSERT INTO LOR
    SELECT 222
    , sysdate
    , 'you string'
    FROM dual
    CONNECT BY level <= :Pxx_
    
  • How to build a list or a table with fixed values?

    Is it possible to create a list or a table with fixed values, but with a variable length?

    for example:

    var columns = "name, age, function;

    var insertParams = generateList ( listLen (columns), ',','.) » ); *

    fact: insertParams = ',?,??


    * (this function does not exist. This is just to illustrate what I need)

    I know that this feature is easily created by creating a loop, but I was wondering if it was possible with a single line of code.

    Thank you

    If he can generate a table in the same way, which would be as well.

    Our messages have clashed. But I think that repeatString() would do the trick. You could cut the rear comma with left() or convert it to a table. By default, ListToArray() will silently ignore the trailing comma.

  • Indexing of a table with multiple indexes

    Hi all

    I just used the detector of Ridge VI on table 1 d with a threshold.  I now have an array of index I need to round to use as a real index.  My question is, with this index corresponding to the points picture, how, I take the peak values

    To give a bit of context:

    1. I have three time correlated signals.  I filter them, normalize, then add them so that I can increase the signal-to-noise ratio.

    2 pic DetectionVI gives me a table where are these pics

    3. I want my end result

    A. Signal1 [peak_indices]

    B. Signal2 [peak_indices]

    C.Signal3 [peak_indices]

    Now I think about it in the way I have d code in MATLAB which is much easier, but I would like to do this in Labview and would be very happy to any idea.

    Thank you

    -Joe

    As you said, once you have rounded tip to the nearest value locations you have an array of markings. From there on, it should be a simple matter of passing this table in a for loop that auto-index of the results that you went out to generate a table of peak values.

  • Find the size of a table with partitions; Two questions

    DB version: 11.2.0.4

    Platform: Oracle Linux 6.4

    The slot table MH_PKT_HEADR in UTMSBL schema has more than 5000 partitions.

    Because there partitions, you cannot use just view DBA_SEGMENTS to determine the size of the table.

    So, I tried to use 2 SQLs mentioned below. Query1 returned 5 GB. But Query2 has returned a value zero. Query2 is actually a note metalink mentioned below, so he cannot deceive you, I guess.

    That is the reliable accurate query: Query1 or Query2?

    No idea why Query2 returns a Null value?

    - Query1

    fixed lines 200

    Col TABLE_NAME format a18

    with

    BaseData as)

    Select the owner

    nom_segment

    segment_type

    , round (sum (bytes) / 1024/1024/1024) GB

    sum (bytes) bytes

    count (*) segment_count

    of s dba_segments

    Group by owner, nom_segment, segment_type

    )

    ,

    LOB type as data)

    Select the owner

    table_name

    nom_segment

    of dba_lobs

    )

    ,

    all_segs like)

    Select coalesce (lobs.table_name, basedata.segment_name) table_name

    basedata.*

    of basedata

    left outer join

    type LOB data

    on (basedata.segment_name = lobs.segment_name

    and basedata.owner = lobs.owner)

    )

    Select table_name

    sum (bytes) bytes

    sum (gb) GB

    of all_segs

    where table_name = 'MH_PKT_HEADR'.

    and owner = 'UTMSBL. '

    Table_name group;

    TABLE_NAME BYTES GB

    ------------------ ---------- ----------

    5869469696 5 MH_PKT_HEADR

    - Request 2

    -Source: how to calculate the size of a Table that contains outline CLOB and BLOB (Doc ID 118531.1()

    SELECT

    (SELECT SUM (S.BYTES) - the Segment of Table size

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Segment

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT SUM (S.BYTES) - the size of the Lob Index

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    TOTAL TABLE SIZE

    ----------------

    SELECT

    (SELECT nvl (SUM (S.BYTES), 0)-dimensions of the Segment Table)

    FROM DBA_SEGMENTS S

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (S.SEGMENT_NAME = UPPER ('MH_PKT_HEADR'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-Segment Lob size)

    FROM DBA_SEGMENTS S, DBA_LOBS L

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (L.SEGMENT_NAME = S.SEGMENT_NAME AND L.TABLE_NAME = UPPER('MH_PKT_HEADR') AND L.OWNER = UPPER('UTMSBL'))) +

    (SELECT nvl (SUM (S.BYTES), 0)-size of the Lob Index)

    FROM DBA_SEGMENTS S, DBA_INDEXES I

    WHERE S.OWNER = UPPER ('UTMSBL') AND

    (I.INDEX_NAME = S.SEGMENT_NAME AND I.TABLE_NAME = UPPER('MH_PKT_HEADR') AND INDEX_TYPE = 'LOB' AND I.OWNER = UPPER('UTMSBL')))

    "TOTAL TABLE SIZE.

    FROM DUAL;

    David Fitzjarrell

  • Recycle the OCR in LabVIEW (retrieve the index of characters found in the set of characters file)

    Hi all

    I'm trying to recycle my set OCR file in LabVIEW. Basically, I show the reading string to the user and in case something goes not the respective character must be corrected in the charatcer set file, according to the text entered by the user. It sounds pretty simple, but I haven´t find a way retrieve the character index in the file must be recycled. For this I would be needs to know what character in the set file has been found to resemble one give read character. Do you know how I can get this info? I intend to use the OCR rename character VI.

    Best regards

    Esteban

    Hello Arroyo,

    You can retrieve the total number of characters formed using IMAQ OCR VI property and looking for property "size of char set.

    http://zone.NI.com/reference/en-XX/help/370281W-01/imaqvision/imaq_ocr_property/

    Kind regards

    Elli

Maybe you are looking for

  • No problem connecting secure even after selecting "no proxy".

    I decided to start using Firefox again, after about 6 months. The last time I had firefox on Windows 7, it has worked well. I opened it upward, and he will not at all secure sites. I've upgraded to the most recent version, same thing. I went to my co

  • Need to Diver WLAN for my C50-B14Z Satellite

    Hello I had a problem for the recovery of the software on my laptop satellite, so I download a Bing of 8.1 of Windows from the internet.But with the installation, there was no included wirelless driver. So I search the Internet on Satellite wireless

  • If I have a static ip address how rest the modem?

    I was expelled form decorah eagles chatroom and can not enter now. I wrote to them them they said to rest the modem I have maybe astatique ip (I'm not banned)

  • rattling noise Photosmart c4280

    Recently, my Photosmart C4280 makes a quick loud pinging from the start under tension, or whenever I Press PRINT or COPY. The sound seems to come from the right side of the unit, is approximately two seconds and sounds like a mchinegun continuous bur

  • View doc

    Someone who can help me change the mode back to normal plan... Sorry not an expert myself,Thank you in advance!