Simply extract the unique rows in table 2d
Hello, I'm sorry for my English. I have a chart 2D with thousends of rows and 2 columns. I want to extract only the unique rows in the table. So I need to exclude all lines have that / which (?) duplicate (s) and exclude the duplicate (s) too.
Simple example:
Input array:
0 0 ---> single
0 1 ---> D1
1 0 ---> single
1 1 ---> D1
0 1 ---> D2
2 0 ---> single
1 1 ---> D2
2 0 ---> D1
1 1 ---> D3
2 0 ---> D2
2 2 ---> unique
Desired output table:
0 0
1 0
0 2
2 2
Can someone help me?
Hi Werty,
To do this is to compare each line with the entire table and count the number of matches.
If there is only a single match, then the line is unique.
Here is an example:
Outside for the index of the loop through each line.
Inside of the loop compares each line with the entire table and counts the matches.
Then, a check is made to see if this line is unique.
The case statement adds unique lines in the output array.
Note: Use a table function build in a loop like this could cause problems if there will be a large number of unique lines.
Tags: NI Software
Similar Questions
-
Extracting the data from relational tables in 11.1.2.1
I want to extract the following data sets from relational tables
1 attribute and his partner basic member
2 Smartlist value of an account
Have a code to extract such data? It will be useful in pointing to the correct table names.
Thank youYou will find the table schemas in the [documentation for EPMA | http://www.oracle.com/technetwork/middleware/bi-foundation/epm-data-models-11121-354684.zip]. If this does not work, there are other options to export hierarchies in text files. You can use the lifecycle management or the [EPMA line Generator | http://docs.oracle.com/cd/E17236_01/epm.1112/epma_file_gen_user/launch.html].
Kyle Goodfriend
http://www.in2hyperion.comPlease make sure that you assign your post as answered when an appropriate response is provided (or useful when it takes place) as well as other benefits.
-
Indexing for loop while seizing the unique values in table
Hi all
I have another question. Overall, I have a table and I want to take each element of this array. My thoughts of how do are the following:
I use a loop for the indexing of my table. Then I create a local variable outside of the loop in order to get the individual elements of the array. But it does not work I think because the local variable is not updated at each iteration.
Also, it feels like there is a more elegant way to do what I want to do.
Can someone give me some advice to solve my problem?
Thank you very much.
Best regards
Tresdin
I don't know why you are so hung up with a local variable to send sequential orders of VISA.
Here's what I do:
That sends commands to the SCPI 7 to my AC source with a delay of 100 ms between each command sent.
-
How to extract the indictments of several tables
Hi all
I have 10 tables that all have the same columns, but different data in each column. I would like to get a count of how many fields is not null for a specific column in each table. I tried to figure this out for hours without success. We use oracle 10g and I use Toad to write my SQL.
I will try to give you an example.
The SQL below returns the numbers for one of the tables. I would like to get the counts for each table with a single query.
SELECT COUNT(*) FROM RRM_HOME_EQ WHERE unit_id is not null AND account_off is not null;
Thanks in advance
OR
Try as below...
Select (select count (*) from emp where deptno = 10) tab1, tab2 (select count (*) of the Department)
Double;
TAB1 TAB2
---------- ----------
3 7
Hope this helps... !
-
Remove the double row of table 2d
I repeat from memory a technique I've seen for the first time Darin.K use. It's a smart way to exploit the attributes of variant:
-
SQL > select lower (sysdate + 1 |) (' test') twice;
LOWER (SYSDATE + 1
---------------
07 jul-2014test
SQL > select lower ('test' | + 1 sysdate) twice;
Select lower ('test' | sysdate + 1) of the double
*
ERROR on line 1:
ORA-01722: invalid number
The query fails because it cannot perform arithmetic (+ 1) on a channel not digital. However, the query that successfully interpreted the arithmetic in the first place, that it concatenated the string 'test' to it... Make sense?
-
Copy the data rows in the same table
Here is the structure of the table, I work I would like all the value with ID = 1 in new lines. The ID must be 2 with the same data.
I am using following query to accomplish, but get the error.
Insert into hsp_column_detail_item (DETAIL_ID, VALUE, POSITION, GENERATION, OPERATOR, LABEL)
Select 2, POSITION, GENERATION, OPERATOR, VALUE, LABEL
Of
hsp_column_detail_item
where
detail_id = 1
ORA-02291: integrity constraint (PLANSAMP. FK_HSP_DETAIL_ID) violated - key parent not found
Columns
Detail_ID 1 THERE INTEGER NUMBER Frequency VALUE 2 THERE FLOAT None POSITION 3 THERE INTEGER NUMBER None GENERATION 4 THERE INTEGER NUMBER None OPERATOR 5 THERE INTEGER NUMBER None LABEL 6 THERE VARCHAR2 (1500 bytes) None Sample data:
Label Detail_ID value generation operator Position
1 500 0 0 1 ABC 1 300 1 0 1 def 1 200 2 0 1 EFG Index
Name of the index Column name Col_Detail_Item Detail_ID Col_Detail_Item Position 866532 wrote:
Where detail_id in
(select detail_id in the hsp_column_detail where)
dim1 = (select object_id from hsp_object where the object_name = 'Real' and object_type = 31) and
Dim5 = (select object_id from hsp_object where the object_name = 'Work' and object_type = 35) and
dim7 = (select object_id from hsp_object where the object_name = 'FY13' and object_type = 38)
);
ORA-00001: unique constraint (PLANSAMP. Voilated PK_HSP_COL_DETAIL)
To not violate the unique constraint, two requirements:
-The detail_id 5 you insert would not already exist in the table
-Since you are forcing this detail_id, your subquery must return only one row: so you can write ' detail where id = (select...) "and:
-either the dim1 / dim5 / dim7 filters are quite selective
- or to make any decision on which detail_id to reproduce: max (detail_id) or min (detail_id) or any other way yo select the right / arbitrary
-
Turn off the ADF parasmo tab based on the selection of rows in table
Hello
We have page ADF, which consists of a table within a collection of panels, which in turn is inside a Panel tab that user can select several rows in this table. There is also a second tab that you want to activate only if the user has selected a single line in the table. This should be disabled if several lines are selected in the table. Please let me know how this can be accomplished. The selection of multiple rows in the table is a must for users.
I use jDeveloper 11.1.2.3.0
Thank you
Ashwin
Published by: 989372 on April 24, 2013 08:22Hello
1. set up the table for selection of rows multi
2. If you initially created the unique selection table, delete the SelectionListener entry added by JDeveloper
3. create a custom pointing to a managed bean selection listener
4. in the selection listener, call getComponent on the selection event (http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/event/SelectionEvent.html) and cast to richeTableau
5. on rich table Manager, call getSelectedRowKeys (http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10684/oracle/adf/view/rich/component/rich/data/RichTable.html)
6. If there is more than one key of the selected row, set a property of a managed bean (for example showTab) false and PPR Panel tab
7 use the property "off" from the showDetailItem (http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showDetailItem.html) to point to the property Boolean managed beanFrank
-
How to get the value of row current table when press the button submit
Hello
I want to get the current value of the SuccessionPlanId line which is part of the column in a table that is advanced.
I created a (created using customization, from action through CO) button in the table as column, so each line with a single key, if I press the button of the first line means so I want to extract the first line SuccessionPlanId and if it's the 3rd way so I want to get the value of the value of the third row.
How in the post of controller?
Please answer soon, its urgency.
Thanks in advance,
SANOK, need to go with a delicate way,
1.) create a new table with Jdeveloper and there shud be a replica of the room once except the button submit newly added, pls note button type shud be present the type of button.
2.) hide the existing table area and create a new stacklayoutbean.
(3.) this stacklayout bean will have the property to extend, you give the full path of the new custom of advanced table box.
Now you should be able to get the reference of the line during the click on the "submit" button
-
CFHTTP Parse page for the last row of the table
OK, so I need to analyze the page returned from a cfhttp call and select the last row in a table. I then take the value of this line and run another cfhttp to another page. This returns an html page where I'll need to parse for extr the img tag. Any thoughts?
Here is a code:
"" < cfhttp url = ' http://SERVERNAME/GetPhotoEncounters.cgi ' method = 'post' resolveurl = "yes" >
< name cfhttpparam = 'TXTBox' type = "formfield" value = "17133804" >
< / cfhttp >
He returns (at the source):
"< form method = post name ="EncounterInfo"action =" http://SERVERNAME/GeneratePhotos.cgi "> "
< table border units is relative width is 0.9 colspec "C2 C1 C1 C1 C1 C1 C1 C1 C1" = >
< th align = center > < view h3 > < / h3 >
< th align = center > < No. h3 > < / h3 >
< th align = center > < ID h3 > < / h3 >
< th align = center > < Type of encounter h3 > < / h3 >
< th align = center > < h3 > Date & time < / h3 >
< th align = center > < Type h3 > < / h3 >
< th align = center > < system indicator X h3 > < / h3 >
< th align = center > < location Images h3 > < / h3 >
< th align = center > < h3 database Ind > < / h3 >
<! - data - >
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "36659622; 02/06/05 13:31:29 ">
< td align = center > 36659622
< td align = center > 17133804
< td align = center > BP
< td align = center > 02/06/05 13:31:29
< td align = center > F
< td align = center > ENF
< td align = center > 967
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "37070943; 09/06/05 14:28:28 ">
< td align = center > 37070943
< td align = center > 17133804
< td align = center > BP
< td align = center > 09/06/05 14:28:28
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "38114421; 23/06/05 19:03:50 ">
< td align = center > 38114421
< td align = center > 17133804
< td align = center > BP
< td align = center > 23/06/05 19:03:50
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "38216303; 24/06/05 22:30:42 ">
< td align = center > 38216303
< td align = center > 17133804
< td align = center > BP
< td align = center > 24/06/05 22:30:42
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "41424139; 04/08/05 22:48:21 ">
< td align = center > 41424139
< td align = center > 17133804
< td align = center > BP
< td align = center > 04/08/05 22:48:21
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "42971024, 19/08/05 11:59:35" >
< td align = center > 42971024
< td align = center > 17133804
< td align = center > BP
< td align = center > 19/08/05 11:59:35
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "43676008, 15/09/05 00:43:33" >
< td align = center > 43676008
< td align = center > 17133804
< td align = center > BP
< td align = center > 15/09/05 00:43:33
< td align = center > R
< td align = center > ENF
< td align = center > 968
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "51501911; 20/02/06 01:17:16 ">
< td align = center > 51501911
< td align = center > 17133804
< td align = center > BP
< td align = center > 20/02/06 01:17:16
< td align = center > R
< td align = center > ENF
< td align = center > 970
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "52543143; 20/03/06 06:06:56 ">
< td align = center > 52543143
< td align = center > 17133804
< td align = center > BP
< td align = center > 20/03/06 06:06:56
< td align = center > R
< td align = center > ENF
< td align = center > 971
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "52812077, 30/03/06 08:36:15" >
< td align = center > 52812077
< td align = center > 17133804
< td align = center > BP
< td align = center > 30/03/06 08:36:15
< td align = center > R
< td align = center > ENF
< td align = center > 971
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "52983796; 07/04/06 15:15:32 ">
< td align = center > 52983796
< td align = center > 17133804
< td align = center > BP
< td align = center > 07/04/06 15:15:32
< td align = center > R
< td align = center > ENF
< td align = center > 971
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "53243687; 23/04/06 14:58:23 ">
< td align = center > 53243687
< td align = center > 17133804
< td align = center > BP
< td align = center > 23/04/06 14:58:23
< td align = center > R
< td align = center > ENF
< td align = center > 972
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "54447246; 24/06/06 00:46:23 ">
< td align = center > 54447246
< td align = center > 17133804
< td align = center > BP
< td align = center > 24/06/06 00:46:23
< td align = center > R
< td align = center > ENF
< td align = center > 973
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "56717661; 05/07/06 06:45:19 ">
< td align = center > 56717661
< td align = center > 17133804
< td align = center > BP
< td align = center > 07/05/06 06:45:19
< td align = center > R
< td align = center > ENF
< td align = center > 973
< td align = center > R
< b >
< td align = center > < input type = "checkbox" name = "eid" value = "61073876; 28/08/06 02:13:33 ">
< td align = center > 61073876
< td align = center > 17133804
< td align = center > BP
< td align = center > 28/08/06 02:13:33
< td align = center > R
< td align = center > ENF
< td align = center > 974
< td align = center > R
< /table >
< /Center >
< p align = "left" > < input type = "checkbox" name = "photoOnly" > < p >
< INPUT TYPE = "SUBMIT" NAME = 'SUBMIT_BUTTON' VALUE = 'Show the photo (s)' >
< INPUT TYPE = "BUTTON" NAME = "SELECT_ALL_BUTTON" VALUE = "Select all" onClick = "doSelectAll (15)" >
< INPUT TYPE = "RESET" NAME = "CLEAR_ALL_BUTTON" VALUE = "Remove all" >
< input type = "hidden" name = 'TXTBox' value = "17133804" >
< br >
< / make >
I need the last row of the table checbox value. In this way, I can present this value on the next page via cfhttp. That would return:
border = 1 >
< b >
< td align = "center" > < font color = 'blue' size = 4 > EID < / make >
< td align = "center" > < font color = 'blue' size = 4 > Date < / make >
< td align = "center" > < font color = 'blue' size = 4 > picture < / make >
< td align = "center" > < font color = 'blue' size = 4 > picture < / make >
< td align = "center" > < font color = 'blue' size = 4 > picture < / make >
< b >
< td > < b > < /b > 61073876
< td > < b > 28/08/06 < /b > < br > < b > < /b > 02:13:33
< td >
< img src = "" / image_cache/61073876.jpeg ' height width 200 = 200 = > "
< td >
< img src = "" / image_cache/61073876_F2.gif ' height width 200 = 200 = > "
< td >
< img src = "" / image_cache/61073876_F7.gif ' height width 200 = 200 = > "
< /table >
On this basis, I need to the variable value, CBC three img tags. Then I can insert these values into a local database.
Help me please, because I'm drowning on this one!
Thank you all.You could loop on the content of the file and then parsing each line using a regular expression to extract your checkbox values and image. This is code that I wrote which gets the last box and a panoply of images based on your example. You may need to adjust the regular expression a bit if your example is not the same as the HTML code that you are monitoring.
-
Store the new values in the table in the new row so that the 'old' remains in the previous lines
Hello
I am a student of genius embedded. I did a VI where I change the values of digital controls, and it saves it as a table.
I want to store the pair of new values in the new row of this table.
I have attached a VI where I can change the values of numeric control, as well as the number of lines from another control. But when I change the values, all values in the output table change including values in the previous row. I want these lines to be unchanged and that new line to update.Need help.
If I understand correctly, you want to always 4 models. If so a 2D table will do the trick (see annex VI), otherwise crossrulz' solution should work.
-
kindly tell how to use the unique value of a table with the index 0
kindly tell how to use the unique value of a table with the index 0
Hi
Yep, use Index Array as Gerd says. Also, using the context help (+ h) and looking through the array palette will help you get an understanding of what each VI does.
This is fundamental LabVIEW stuff, perhaps you'd be better spending some time going through the basics.
-CC
-
MathScript adds the row of table
Hello LabVIEWers,
I recently encountered a problem using the MathScript that I don't understand. When I create a simple table of dimension 1 and then access a single element in this array, MathScript and/or LabVIEW adds an extra line in this table. This problem appears when I add the output for the MathScript structure array and create an indicator. A VI sample that illustrates the problem I encounter is attached. I have also run the same code MathScript in MatLab and the issue does not seem to occur. Is there something that I am missing? Perhaps a logical reason and explantion for why LabVIEW for this? I searched on the web, help and forums so far. Any help is appreciated.
My goal is to be able to access the items in a table without changing the dimensions of the table, or to manually remove the added row.
Kind regards
Doug
Hello Doug77,
In the line where you replace the 5th element of the array, if you say public (5) = 77, LabVIEW will not add the extra line. Almost everything in Mathscript if defined as a matrix. That's why you see size as 1.11. If you try to manipulate the public in the form of a 2D picture, saying test_array (1,5), mathscript guess it must be a 2D array.
Let me know if it helps.
-
Best way to update the individual rows of a Table?
I took a quick glance at a few examples, but did not get a clarification on this. I am looking to have something close to a listbox control or the table to where I can update just one column of values to line a 1 time per second pace. I'm looking to display our acquisition of data values in a table or a listbox control. The single list box seemed to work well for that, but I couldn't use the row headers to list the names of channel beside the channel values. I thought to link the values of cursor in two areas of list to do this, but did not find any info on it for the single list box.
I have a few questions:
(1) I have a 1 d table to where I want to use this data to constantly update the first column (with a multitude of lines) of a table. I'm looking for the best route to not take too much time for treatment by doing this.
What is the best way to update the individual rows of a table? Invoke the node "Value of the cell value"... or is there another method?
(2) why is that, after each iteration else, row values are deleted?
Also, for adding additional channels originally arrray... it is better to use the 'Array' subset then the function "Construct the table" or function "Subset of the table" and "insert table"?
See the attached example.
Thank you.
Jeff· Þ· Bohrer says:
(2) why is that, after each iteration else, row values are deleted?
Classic race condition. dump the loop and node-p and just wire the 2D table on the terminal Board. !
I don't see the race condition. What I see is the table once the last element has been written for it all run the oil. I saw looked it with point culminating performance on.
But I agree entirely with writing to the Terminal. It is a 1 d array, so you will need to use an array of generation and convert a 2D array in order so that he could write correctly.
-
Customize the table (first column and the first row)
Hello everyone, I have a question: How can I insert words and numbers in the same table?
I have create a VI that measure the temperature with an external instrument and put the data into a table, which is saved.
Each line is a Thermocouple and each column is a measure, but there are only numbers!
I would have the first column with the name of the channel and line of fist with the name of the measure.I had create an excel for example to explain my wish (Cattura.PNG).
Thanks to all who help me
You can insert headers required as column and row to convert it to an array of strings, as in the image below.
Maybe you are looking for
-
Satellite L300 - driver Open Webcam fail. Restart the computer or the camera
Hello I recently bought a new Satellite L300 under Windows Vista Home Premium SP1. The Webcam worked fine for a few days and then the next time I booted up Vista, I get the following error "Webcam driver open fail, please restart camera or computer.
-
No disc shows during the installation of windows 7
Hey guys help me I install windows 7 genuine dvd and selected partition 4, 182 GB after awhile its stuck at 94% for 1 hours and I pressed powerbutton forcely to close the facility. After that I chose to install my windows bootable USB windows to star
-
Curve 8320 blackBerry Smartphones; Optimal resolution for playback of video files?
I use a Nueros MP4 recorder to copy TV for my curve. There are several possible video file settings, but some parameters of the curve will not be reading, give me a file error message. Other parameters of audio-video are not synchronized. I'm worki
-
Clint pc networked with area asking the password every time
I have Server 2003 enterprises edition with unique domain & windows 8.1 pro installed on the PC of clint, but when will access his password every time invites you Concerning SP mishra
-
actions dynamic apex 5.0
I have upgraded an apex 5.0 application and have some bugs related to the dynamics of the actions.It seems that even when the field 'referred to submit page' was filled in the value / elements of session state is not updated and therefore cannot be u