Add the large table column
All-
I have my data (20 columns of ~ 700 000 lines) stored in a binary file and I would like to add a timestamp to each row of data. I intend to use the sampling with the number of samples to add the time at which the sample was recorded in data. I have read the data (~ 700 000 samples) and use a grand for a table 1 d with the same number of rows of data and then insert the 1 column in the largest table that has my data. However, this seems to take a lot of time and I am looking for a faster/more simpler way. Significant NY, I mean the vi works for about 20 min before me give up and stop it. I posted a PNG of the block diagram. Any help will be much appreciated.
Thank you
Chris
Hi humada,.
Try this...
Tags: NI Software
Similar Questions
-
How to cut the large table into pieces
I'm trying to derive some of generic logic that would be cut into pieces of defined size a large table. The goal is to perform the update into pieces and avoid questions too small restoration. The full table on the update scan is inevitable, given that the update target each row of the table.
The BIGTABLE has 63 million lines. The purpose of the bellow SQL to give ID all 2 million rows. So I use the rownum 'auto line numering field' and run a test to see I could. I expected the piece of fist to have 2 million rows, but in fact, it is not the case:
Here is the +(NOTE I had many problems with quotes, so some ROWID appears without their enclosing quotes or they disappear from current output here) code +:
Amzingly, this code works perfectly for small tables, but fails for large tables. Does anyone has an explanation and possibly a solution to this?select rn, mod, frow, rownum from ( select rowid rn , rownum frow, mod(rownum, 2000000) mod from bigtable order by rn) where mod = 0 / SQL> / RN MOD FROW ROWNUM ------------------ ---------- ---------- ---------- AAATCjAA0AAAKAVAAd 0 4000000 1 AAATCjAA0AAAPUEAAv 0 10000000 2 AAATCjAA0AAAbULAAx 0 6000000 3 AAATCjAA0AAAsIeAAC 0 14000000 4 AAATCjAA0AAAzhSAAp 0 8000000 5 AAATCjAA0AABOtGAAa 0 26000000 6 AAATCjAA0AABe24AAE 0 16000000 7 AAATCjAA0AABjVgAAQ 0 30000000 8 AAATCjAA0AABn4LAA3 0 32000000 9 AAATCjAA0AAB3pdAAh 0 20000000 10 AAATCjAA0AAB5dmAAT 0 22000000 11 AAATCjAA0AACrFuAAW 0 36000000 12 AAATCjAA6AAAXpOAAq 0 2000000 13 AAATCjAA6AAA8CZAAO 0 18000000 14 AAATCjAA6AABLAYAAj 0 12000000 15 AAATCjAA6AABlwbAAg 0 52000000 16 AAATCjAA6AACBEoAAM 0 38000000 17 AAATCjAA6AACCYGAA1 0 24000000 18 AAATCjAA6AACKfBABI 0 28000000 19 AAATCjAA6AACe0cAAS 0 34000000 20 AAATCjAA6AAFmytAAf 0 62000000 21 AAATCjAA6AAFp+bAA6 0 60000000 22 AAATCjAA6AAF6RAAAQ 0 44000000 23 AAATCjAA6AAHJjDAAV 0 40000000 24 AAATCjAA6AAIR+jAAL 0 42000000 25 AAATCjAA6AAKomNAAE 0 48000000 26 AAATCjAA6AALdcMAA3 0 46000000 27 AAATCjAA9AAACuuAAl 0 50000000 28 AAATCjAA9AABgD6AAD 0 54000000 29 AAATCjAA9AADiA2AAC 0 56000000 30 AAATCjAA9AAEQMPAAT 0 58000000 31 31 rows selected. SQL> select count(*) from BIGTABLE where rowid < AAATCjAA0AAAKAVAAd ; COUNT(*) ---------- 518712 <-- expected around 2 000 000 SQL> select count(*) from BIGTABLE where rowid < AAATCjAA0AAAPUEAAv ; COUNT(*) ---------- 1218270 <-- expected around 4 000 000 SQL> select count(*) from BIGTABLE where rowid < AAATCjAA0AAAbULAAx ; COUNT(*) ---------- 2685289 <-- expected around 6 000 000
Here's the complete SQL code that is suppposed to generate all the predicates, I need to add update statements in order to cut into pieces:
Nice but not accurate...select line from ( with v as (select rn, mod, rownum frank from ( select rowid rn , mod(rownum, 2000000) mod from BIGTABLE order by rn ) where mod = 0), v1 as ( select rn , frank, lag(rn) over (order by frank) lag_rn from v ), v0 as ( select count(*) cpt from v) select 1, case when frank = 1 then ' and rowid < ''' || rn || '''' when frank = cpt then ' and rowid >= ''' || lag_rn ||''' and rowid < ''' ||rn || '''' else ' and rowid >= ''' || lag_rn ||''' and rowid <'''||rn||'''' end line from v1, v0 union select 2, case when frank = cpt then ' and rowid >= ''' || rn || '''' end line from v1, v0 order by 1) / and rowid < AAATCjAA0AAAKAVAAd and rowid >= 'AAATCjAA0AAAKAVAAd' and rowid < 'AAATCjAA0AAAPUEAAv'' and rowid >= 'AAATCjAA0AAAPUEAAv' and rowid < 'AAATCjAA0AAAbULAAx'' and rowid >= 'AAATCjAA0AAAbULAAx' and rowid < 'AAATCjAA0AAAsIeAAC'' and rowid >= 'AAATCjAA0AAAsIeAAC' and rowid < 'AAATCjAA0AAAzhSAAp'' and rowid >= 'AAATCjAA0AAAzhSAAp' and rowid < 'AAATCjAA0AABOtGAAa'' and rowid >= 'AAATCjAA0AAB3pdAAh' and rowid < 'AAATCjAA0AAB5dmAAT'' and rowid >= 'AAATCjAA0AAB5dmAAT' and rowid < 'AAATCjAA0AACrFuAAW'' and rowid >= 'AAATCjAA0AABOtGAAa' and rowid < 'AAATCjAA0AABe24AAE'' and rowid >= 'AAATCjAA0AABe24AAE' and rowid < 'AAATCjAA0AABjVgAAQ'' and rowid >= 'AAATCjAA0AABjVgAAQ' and rowid < 'AAATCjAA0AABn4LAA3'' and rowid >= 'AAATCjAA0AABn4LAA3' and rowid < 'AAATCjAA0AAB3pdAAh'' and rowid >= 'AAATCjAA0AACrFuAAW' and rowid < 'AAATCjAA6AAAXpOAAq'' and rowid >= 'AAATCjAA6AAA8CZAAO' and rowid < 'AAATCjAA6AABLAYAAj'' and rowid >= 'AAATCjAA6AAAXpOAAq' and rowid < 'AAATCjAA6AAA8CZAAO'' and rowid >= 'AAATCjAA6AABLAYAAj' and rowid < 'AAATCjAA6AABlwbAAg'' and rowid >= 'AAATCjAA6AABlwbAAg' and rowid < 'AAATCjAA6AACBEoAAM'' and rowid >= 'AAATCjAA6AACBEoAAM' and rowid < 'AAATCjAA6AACCYGAA1'' and rowid >= 'AAATCjAA6AACCYGAA1' and rowid < 'AAATCjAA6AACKfBABI'' and rowid >= 'AAATCjAA6AACKfBABI' and rowid < 'AAATCjAA6AACe0cAAS'' and rowid >= 'AAATCjAA6AACe0cAAS' and rowid < 'AAATCjAA6AAFmytAAf'' and rowid >= 'AAATCjAA6AAF6RAAAQ' and rowid < 'AAATCjAA6AAHJjDAAV'' and rowid >= 'AAATCjAA6AAFmytAAf' and rowid < 'AAATCjAA6AAFp+bAA6'' and rowid >= 'AAATCjAA6AAFp+bAA6' and rowid < 'AAATCjAA6AAF6RAAAQ'' and rowid >= 'AAATCjAA6AAHJjDAAV' and rowid < 'AAATCjAA6AAIR+jAAL'' and rowid >= 'AAATCjAA6AAIR+jAAL' and rowid < 'AAATCjAA6AAKomNAAE'' and rowid >= 'AAATCjAA6AAKomNAAE' and rowid < 'AAATCjAA6AALdcMAA3'' and rowid >= 'AAATCjAA6AALdcMAA3' and rowid < 'AAATCjAA9AAACuuAAl'' and rowid >= 'AAATCjAA9AAACuuAAl' and rowid < 'AAATCjAA9AABgD6AAD'' and rowid >= 'AAATCjAA9AABgD6AAD' and rowid < 'AAATCjAA9AADiA2AAC'' and rowid >= 'AAATCjAA9AADiA2AAC' and rowid < 'AAATCjAA9AAEQMPAAT'' and rowid >= 'AAATCjAA9AAEQMPAAT'' 33 rows selected. SQL> select count(*) from BIGTABLE where 1=1 and rowid < AAATCjAA0AAAKAVAAd ; COUNT(*) ---------- 518712 SQL> select count(*) from BIGTABLE where 1=1 and rowid >= 'AAATCjAA9AAEQMPAAT'' ; COUNT(*) ---------- 1846369
The problem is that your query implies that ROWID, and ROWNUM are classified in the same way. For small tables it is very often the case, but not for the larger tables. Oracle does not guarantee return records in the order the rowid. However usually it works this way.
You could test ensuring that get you the rownum after you ordered. And see if it works then.
select rn, mod, frow, rownum from (select rn, rownum frow, mod(rownum, 2000000) mod from (select rowid rn from bigtable order by rn) order by rn ) where mod = 0 /
-
The Master Table column updated based on the sum of column Table detail
With the help of JDev 11.1.1.6.I have a master-detail table based on a link to BC.
The main table has a column that displays an InputText or an OutputText, based on the value in another column.
If the InputText is displayed, the user can enter a value and the database will be updated with that value.
If the OutputText is displayed, it must be a sum of a column in the secondary table. Also, this value will be written in the database.
Question:
How can I fill the OutputText in the main table with the sum of the values in a column in the secondary table?
The detail table column is a manually entered InputText field.
Thank you.
Create a spike in the main table and write in its expression as follows - DetailVoAccessorName.sum ("ColumnName");
This will calculate the sum of column table detail and then you can set the value of the transient attribute to attribute DB on backup operation
Ashish
-
How to align an image centered in the advanced table column.
Dear friends,
I developed a page of the OAF with an image column in the advanced table, but by default the image column is not centered,
How to make image centered in the advanced table column, please let me know your suggestions.
Thank you
Keerthi.KHAD,
In your column, create a tabular presentation and a rowlayout and the image, and then put in the rowlayout. Set the horizontal alignment of the rowlayout inwards.
Kristofer Cruz
-
How do I display values skyrocket in the IR filter for the joined table columns?
Hello
I have a problem in the IR the query is based on a table, joined with other tables. I would like to provide users the ability to use IR filter search bar in the joined table columns. The problem facing on this filter, the Expression field, by pressing the arrow button displays values for the fields in the primary table, but not for fields that come from joined tables. Have you experienced this behavior in your reports? Is this normal?
TIAHello
Correlated subqueries can improve performance - but it does not depend on the involved tables, the number of columns and the existence of indices. As far as I know, the optimizer has problems with them. You could try to explain the Plans on the two statements to verify that.
In any case, I created a new test page with the SQL for IR:
SELECT E.EMPNO, E.ENAME, D.DEPTNO, D.DNAME, E2.EMPNO "EMPNO2", E2.ENAME "ENAME2" FROM EMP E, EMP2 E2, DEPT D WHERE E.EMPNO = E2.EMPNO(+) AND E.DEPTNO = D.DEPTNO(+) AND E2.PRIMARY_EMPLOYEE(+) = 'Y'
http://Apex.Oracle.com/pls/OTN/f?p=267:226
As far as I can see, it works properly - except that if I do a filter on the ename column, when I try to create a second filter, drop-down lists ename all the values, while the other columns list only the available values after having applied the first filter. Which seems strange that the filters are applied as ANDS. But it does the same thing for other areas - IE, the field used in a filter is not filtered for the second filter - so I guess this is normal, but only a person in Apex could probably explain why it is so.
Otherwise, everything seems to work as I expect and the above page works the same as my test page, which uses external joins http://apex.oracle.com/pls/otn/f?p=267:224
Andy
-
editing a table to add the number of columns fails with ORA-01792
I'm editing a table to add columns, and ORA-01792 receiver: maximum number of columns in a table or view is 1000. The table of the altar will be no more than 1000 columns. The environment is RHE5 Oracle 11.2. ALTER statement adds a lot of columns in the table, but when I do a manual change to add a dummy column it works, after that, if I run the original the change works!
What is a table compressed with unused columns?
This may explain the error with the limit of 1000.
-
Is it possible to add the tag XML columns in Table
Hello world!
I'm the new baby of the indesign forum. I need apply the tag XML to each column of the table (name probably test1, test2...)
Please help me on this problem or even to correct my codes.
-yajiviki
My code.
var docRef=app.activeDocument; var ColLen=app.activeDocument.stories.everyItem().tables.everyItem().columns.length; for(i=0; i<ColLen; i++){ var mySel=app.activeDocument.stories.everyItem().tables.everyItem().columns[i]; app.activeDocument.xmlElements[0].xmlElements.add({markupTag:"Test"+(i+1), xmlContent:mySel}); }
Hello
You can easily mark the table initially with the automatic tag command.
myTable.autoTag();
Once this is done, you can target the cells in columns and reset the tag applied:
var xes = myTable.columns[0].cells.everyItem().associatedXMLElement; var n = xes.length; while ( n-- ) xes[n].markupTag = "foo"
HTH
Loïc
-
How to add the not null columns to an existing table?
I have a table with hundreds of row inside. I try to add a new column not null. It gives me the following error
ALTER TABLE sys.xyz CHANGE xyz_no number 4 DEFAULT '1' NOT NULL;
ORA-02296: impossible to activate (sys.) - found null values
Also I tried to do the following
ALTER TABLE sys.xyz CHANGE xyz_no number 4 DEFAULT '1';
And then I tried to ALTER TABLE sys.xyz CHANGE xyz_NO number 4 NOT NULL; and I still gives me the same error. I took the tally for null values for the same column and has 1555.
In this case how can I change my article with not null not?. Please help, I am a newbie in oracle.I cry out to you for creating a table as SYS. However, I'm going to fully support Sybrand making. Never, ever, create any object as SYS unless the source code received you from Oracle in a patch.
Now to your question.
SQL> CREATE TABLE test ( 2 col1 NUMBER, 3 col2 NUMBER); Table created. SQL> INSERT INTO test VALUES (1,1); 1 row created. SQL> INSERT INTO test VALUES (2,NULL); 1 row created. SQL> ALTER TABLE test ADD (newcol NUMBER); Table altered. SQL> ALTER TABLE test 2 MODIFY (newcol NOT NULL DISABLE); Table altered. SQL> SELECT * FROM test; COL1 COL2 NEWCOL ---------- ---------- ---------- 1 1 2 SQL> UPDATE test SET newcol = 3; 2 rows updated. SQL> SELECT * FROM test; COL1 COL2 NEWCOL ---------- ---------- ---------- 1 1 3 2 3 SQL> SELECT constraint_name 2 FROM user_constraints 3 WHERE table_name = 'TEST'; CONSTRAINT_NAME ------------------------------ SYS_C0036620 ALTER TABLE test ENABLE CONSTRAINT SYS_C0036620;
-
Add the value of column based on a different line with the same id
Hello world
I have a query that displays the first three columns of the table below. I would like to add a column to this output, most indicating (for each row) if there is an electronic product in the same order. For example, the command 1 in the table below contains 1 unit of furniture and 1 unit of electronics. In my outings, I would add a flag 'Y' for the two rows 1 and 3. Also, I would add a "N" indicator to any order which does contain all the electronics.
Any ideas on how to achieve this? Any idea or suggestion is appreciated!
order_id product_cat quantity with_electronics 1 furniture 1 THERE 2 grocery 1 N 1 Electronics 1 THERE Thank you
Zsolt
Hi, Zsolt,
You can also use analytical functions. For example:
SELECT order_id, product_cat, quantity
MAX (CASE
WHEN product_cat = 'electronics '.
THEN 'Y '.
ANOTHER "N".
END
) OVER (PARTITION BY order_id) AS with_electronics
Orders
;
Of course, I can't test it without a table.
-
Hello experts...
I'm new to this forum and Oracle coding complex.
I have a task in which I want to compare two tables with the same structure, same columns. My Oracle database is 11g Release 2. I want this column-by-column comparison and save the result in a separate table. (say result_table)
The structure of the table would be as follows:
SQL > desc emp;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER 4
ENAME VARCHAR2 (10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER (2)
SQL > emp_comp desc;
Name Null? Type
----------------------------------------- -------- ----------------------------
EMPNO NOT NULL NUMBER 4
ENAME VARCHAR2 (10)
JOB VARCHAR2(9)
MGR NUMBER(4)
HIREDATE DATE
SAL NUMBER(7,2)
COMM NUMBER(7,2)
DEPTNO NUMBER (2)
Both of the tables EMPNO is the primary key.
I want to compare these two tables based on the EMPNO (EMPNO even is both tables).
The result log table would be as follows:
SQL > create table result_table
2 (check_sr_no, number (5),)
table_name 3 varchar2 (30),
ROW_ID 4 varchar2 (20).
column_name 5 varchar2 (20).
6 column_data varchar2 (1000).
compared_by 7 varchar2 (10));
Table created.
SQL > alter table result_table
2 Add the constraint result_table_pk
3 primary key (check_sr_no);
Modified table.
The name of the table and the name of the column will not be hardcoded (based parameter by user)
I tried to use the dbms_comparison package, but do not find comparison of column to column.
I also used by using the query operator LESS. It's showing the difference in rank.
I also went to https://asktom.oracle.com/pls/apex/f?p=100:11:0:P11_QUESTION_ID:2151582681236
Your help will be very appreciated.
Thank you
DK
Tom Kyte has answered this question MANY times over the years. Here are links for its solution
https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4934799800346640847
-
Calculate the % with the pivot table columns
I created an application with these columns:
I want to create a pivot table looks like this.Metric Study Fast Slow On-Target Total --------------------------------------------------------------------------------- Metric1 Study1 1 0 0 1 Metric1 Study2 1 0 0 1 Metric1 Study3 0 0 1 1 Metric1 Study4 0 0 1 1 Metric1 Study5 0 1 0 1 Metric1 Study6 0 1 0 1 Metric1 Study7 0 0 1 1 Metric1 Study8 0 0 1 1 Metric1 Study9 1 0 0 1 Metric1 Study10 1 0 0 1
The fast, slow, on the target and Total columns are calculated fields. Picky, I'm having is to get the % columns to work. I also tried create columns % in the form of columns of the table, but at each level of study, the % is 100% or 0%.Metric Fast Slow On-Target Total % Fast % Slow % On Target ------------------------------------------------------------------------------------------------------ Metric1 4 2 4 10 40 20 40
I tried with duplicate columns, all different options to display the value as. None of them worked.
Could someone help me? The version of the OBI is 10.1.3.4
Thank you
Shi-ning
Published by: SPUD on November 21, 2011 23:09Sounds like it. You will need the account of studies as a measure in the criteria. You could do something in the repository, but the fastest way is:
Criteria:
Add the study in (it will not go into the PivotTable)
create new measure based on any existing measure that has the background you need with the formula:
cases where [existing] is not null then 1 else 0 endThis will give you 1 for each line that your measure in effect is valid. Add this new measure in the PivotTable and treat it as a normal amount.
-
Unable to get the smaller table column
My page is at http://www.shopburbank.org/merchantList.php The Web site column is too wide, and I can't understand what the problem is. The mysql field is defined as varchar 255 and I went through all the entries to that there is no space after the Web site. The fields that are not met are Null.
Thank you
You want to give people the ability to change your data? By providing this link, I could easily click on the "Edit" link and change your data. And now that I know the link, I can copy it and go to the link, you can change the name of the detail page too.
If you don't want people modify these data, you should probably take this link off the page until you can fix.
You control the table using css. You can do this, but it seems that the page is larger than the actual size of the window when I see if something tells me you have a problem with that. For this reason, each column will expand to fit the width of the page. It doesn't look like it not is in the data.
-
ADF-how to read the value of the ADF Table column.
Hello
I created a table of the adf by reading the variable (CSV) file, separated by commas.
N ° of the table columns is variable.
The last column of the table has the input text box so that the user can enter the values in the user interface.
I want to read these values provided by the user in my grain of support.
Any help or pointers will be great.
Thank you
LecornuHello
Have you tried to analyze the application after you have submitted the form? Just add the following code to your action method.
import java.util.Map; import java.util.Map.Entry; import java.util.Iterator; import javax.faces.FacesException; import javax.servlet.http.HttpServletRequest; ... FacesContext context = FacesContext.getCurrentInstance(); HttpServletRequest request = (HttpServletRequest)context.getExternalContext().getRequest(); Map
requestParameters = request.getParameterMap(); Iterator iter = requestParameters.entrySet().iterator(); while(iter.hasNext()) { Entry entry = (Entry) iter.next(); String key = (String)entry.getKey(); String value = ((String[])entry.getValue())[0]; if(key.contains(":cellInput")) { String yourInputTextValue = value; // Do something with yourInputTextValue } } Concerning
Majo
Edited by: DerMajo the 09.11.2009 13:05
-
How to add the large number of RoboHelp docs to SharePoint version control
I'm on RH11 and some versions of SharePoint, which I'm not sure. I am able to add a document to both HR SharePoint Versioning (file > Version control), but I must have about 49 000 with version control in RoboHelp. I was able to get the files in SharePoint, but now I have to get RoboHelp to be managing the large number of files.
How can I get RoboHelp to give version control a large number of documents at a time?
Are - you're talking about individual files or projects? I guess that the individual, since 49 000 project files can be a bit heavy.
If you add a project to version control, RoboHelp will add all the files in SharePoint. This will take a little time (set HR to add it before you go out for lunch or before going home). At the end of the day, you can check in the entire project in a single click. Or you see something else?
You can still manipulate the files .apj of HR to very quickly add loads of files to a project. If you have files in SharePoint, you can update the FPJ files (use the following script: missing subject Fixer). Then remove the CPD and start the project.
-
How to find the biggest and the larger tables in Oracle 10 g?
Hi people,
Environment: 10g Rel 2
Can someone please suggest the view (s) data dictionary that I can query for a list of the longest (lines) and tables (columns) wide in any schema?
Thanks in advance
rogers42Can someone please suggest the view (s) data dictionary that I can query for a list of the longest (lines) and tables (columns) wide in any schema?
1* SELECT OWNER, TABLE_NAME LONGEST FROM DBA_TABLES WHERE NUM_ROWS = (SELECT MAX(NUM_ROWS) FROM DBA_TABLES) SQL> / OWNER LONGEST ------------------------------ ------------------------------ SYS WRI$_OPTSTAT_HISTGRM_HISTORY 1* SELECT OWNER, TABLE_NAME WIDEST FROM DBA_TABLES WHERE AVG_ROW_LEN = (SELECT MAX(AVG_ROW_LEN) FROM DBA_TABLES) SQL> / OWNER WIDEST ------------------------------ ------------------------------ SYSMAN MGMT_PAF_TEXTUAL_DATA
Maybe you are looking for
-
I received the following email and wanted to share in order to ensure that no one is a victim of this scam! The sender was: [email protected] via cepfonline.org according to my Gmail account. Dear Sir The following changes to your Apple ID were conduc
-
Why firefox, send emails to my contacts from my e-mail invite them to learn more about Firefox Hello?
-
14.01 Firefox when loading really sloww after AMD Catalyst 12.8 installed
My problem looks different from the others in that I don't get graphics anomalies or unusually heavy memory usage. Similarly, the question that I have started after the installation of the AMD Catalyst 12.8. I installed a second time do the ritual AM
-
I get a 'High Performance' notification box
who says that my computer is at its virtual memory limit. What should do?
-
Please help wifi does not not ACER aspire 4710g (wireless network card problem)
Please help me C:\Users\ali>ipconfig/all Windows IP configuration Name of the host...:-PC Primary Dns suffix...: Node... type: hybrid Active... IP routing: No. Active... proxy WINS: No. Wireless Network Connection 3 Wireless LAN adapter: State of the