Storage of the data in a table problem
Hi guys,.I have the following schema:
< xsd: element name = "Details" type = "DetailsType" / >
< xsd: complexType name = "DetailsType" >
< xsd: SEQUENCE >
< xsd: element name = "count" type = "xsd: Integer" / >
< xsd: element name = "loop" type = "xsd: Integer" / >
< xsd: element name = "test" type = "xsd: Integer" / >
< xsd: element name = "test2" type = "xsd: String" / >
< xsd: element name = "test3" type = "xsd: String" / >
< xsd: element name = "ReceiptArr" type = "xsd: String" maxOccurs = "unbounded" / >
< / xsd: SEQUENCE >
< / xsd: complexType >
where I said ReceiptArr in a table.
I try to copy the data in the table, but it does not work.
I want the data to be like that
ReceiptArr [1] = 12345
ReceiptArr [2] = 23456
ReceiptArr [3] = 78900
.
.
.
etc.
Here is my statement copy of bpel
< copy >
< expression = "ora:getNodes ('receiveInput_Get_InputVariable', 'CashReceipt', concat ('/ ns2:CashReceipt / ns2:Detail [', bpws:getVariableData('DebtorVar','/ns9:Details/ns9:loop'),'. / ns2:receipt_number'))" / >
< variable = "DebtorVar."
Query = "Concat ('/ NS9:Details / NS9:ReceiptArr [', bpws:getVariableData('DebtorVar','/NS9:Details/NS9:loop'),']')" / >
< / copy >
and it fails, does anyone know how I can complete my table in bpel?
Thank you
K
Hello
I had to do in the past, and this is the approach I used. Create two variables, one for a number of records and the other as an index of the loop. The index of the loop the value 1 and get a number of nodes in the xml data in the entry for the second variable. Then the loop through the input xml data while the loop index is less than the record number, set the value of your table and incrementing the index of the loop, the use of brackets around the loop index (i.e. open close bpws:getVariableData('Variable_loopIndex') of the angle. I see that when I post this message, this part of the code is eating, and in my browser at least when I replace the ASCII for support, it is displayed instead of the media.
There might be better ways to address the issue, but it worked for my process. I have not tested the below with your types to xml schema, but here's an example of how this can stand as a model using my code:
condition = "bpws:getVariableData('Variable_loopIndex') < = bpws:getVariableData('Variable_recordCount')" > "
Query = "/ ns2:CashReceipt / ns2:Detail / ns2:receipt_number [bpws:getVariableData('Variable_loopIndex')]" / > ""
Query = "/ ns9:Details / ns9:ReceiptArr [bpws:getVariableData('Variable_loopIndex')]" / > ""
Hope this helps
Candace
Published by: cmcavaney on June 25, 2009 08:26
Tags: Fusion Middleware
Similar Questions
-
"shuffle" the data in a table...
Hello world...
Pleade help me solve this problem.
Is it possible to combine the data in a table?
Let say if i have a table with following data.. PERSON_ID PERSON_LAST_NAME PERSON_FIRST_NAME DOB 1 Test1 Test1 01/01/1970 2 Test2 Test2 01/01/1971 3 Test3 Test3 01/01/1972 4 Test4 Test4 01/01/1973 5 Test5 Test5 01/01/1974 I am trying to shuffle the above data so that no person will have their "real last,first and dob match". I need the output like this or in any combinations so that no one can identify a person actual "last name,first name and dob" PERSON_ID PERSON_LAST_NAME PERSON_FIRST_NAME DOB 1 Test1 Test2 01/01/1974 2 Test2 Test4 01/01/1975 3 Test3 Test5 01/01/1971 4 Test4 Test3 01/01/1972 5 Test5 Test1 01/01/1973 please help me to solve this issue. Thanks in advance
Hello
You can do something like this:
WITH got_nums AS ( SELECT person_id , ROW_NUMBER () OVER (ORDER BY dbms_random.value) AS person_id_num , person_last_name , ROW_NUMBER () OVER (ORDER BY dbms_random.value) AS person_last_name_num , person_first_name , ROW_NUMBER () OVER (ORDER BY dbms_random.value) AS person_first_name_num , dob , ROW_NUMBER () OVER (ORDER BY dbms_random.value) AS dob_num FROM table_x -- WHERE ... -- Any filtering goes here ) SELECT id.person_id , ln.person_last_name , fn.person_first_name , db.dob FROM got_nums id JOIN got_nums ln ON id.person_id_num = ln.person_last_name_num JOIN got_nums fn ON id.person_id_num = fn.person_first_name_num JOIN got_nums db ON id.person_id_num = db.dob_num ;
This does not guarantee that no column of the same original line will be on the same line of output. I don't think that you really want it.
-
concatenate the data in 2 tables in a third table as well as in CONCATENATE strings
Hello. as the title says, I wish to only concatenate the data in 2 tables in a similar third table that concatenate strings don't. All tables should be 1 d. For example, suppose that there is 1 table with the following: 1. 2; 3; 4 and table 2 with:; b; c; d. I would like a table 3 either 1 a, 2 b, 3 c, 4 d. Now this could be done easily with above mentioned concatenate strings, then table construction. but table 1 and 2 have something like 150 items. Rather painful. Any ideas?
Hold arrays of two strings in a loop for example, concatentate the strings inside the loop and run the result réécrirait array3.
Autoindexing manages table manipulations.
MIke...
-
Select the data in a table and update in another table
Dear experts,
create the table TB_ENCRYPT
(
Identification number,
Varchar2 (200) KEY
);
INSERT INTO TB_ENCRYPT VALUES(1,'HJUVHDUIFBSDGVU');
SELECT * FROM TB_ENCRYPT;
1 HJUVHDUIFBSDGVU
create TABLE users)
username, NUMBER of
password VARCHAR2 (200)
);
Insert users
values (1, 123 # "")
Insert users
values (2, 456 #')
Select * from users;
1 123 #.
# 2 456
I want to select the data KEY for table TB_ENCRYPT column and update in the column of tables for the respective key user password
TB_ENCRYPT table contains only a single key value. Comparing this key, I want to update the old value of the key to the new value.
For encryption and decryption I followed the java class method.no is worried about that.
create or replace
PACKAGE PCK_ENC AUTHID CURRENT_USER AS
FUNCTION DECRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.decrypt (java.lang.String, java.lang.String) return java.lang.String ';
FUNCTION ENCRYPT (VARCHAR arg0, arg1 VARCHAR) AS VARCHAR BACK LANGUAGE JAVA NAME 'Encrclass.encrypt (java.lang.String, java.lang.String) return java.lang.String ';
END;
SELECT PCK_ENC. ENCRYPT('1234','HJUVHDUIFBSDGVU') FROM DUAL;
HERE,
1234 - is the password of the users table column data
HJUVHDUIFBSDGVU - represents the key of table TB_ENCRYPT column data.
Comparing this key, I want to update the old value of the key to the new value.
I tried with this method
declare
cursor c1 is
Select the key
of TB_ENCRYPT
where id = 1
update the id;
Start
for c1_rec looping c1
update users
password is PCK_ENC. Encrypt (Password, Key)
the location being c1;
commit;
end loop;
end;
/
Help, please
You can use the MERGE statement.
merge into users using tb_encrypt on (id = userid) when matched then update set password = PCK_ENC.ENCRYPT(password,key);
And why you encrypt your password. This isn't a good idea. Just password hash.
-
Delete the data in partitioned tables
Hello
Oracle 11.2.0.3.0 version, running on Linux Enterprise.
I need to remove all the data from two tables (several 100 million lines each) that are partitioned.
(1) table 1 is a partition table have varied to a DATE column
(2) Table2 is a partition of reference table; partitioning is referenced on a relationship of foreign key to Table1 (column: key Table1.Primary)
As I have no need for data, but want to keep the structure of the table, I would ideally like to delete partitions at the same time that the deletion of the data, so that the 2 tables partitioned and empty.
Additionally, Table1 has some partitioned index I would be rebuilt as an index unpartitioned (given that Table1 will be empty).
I thought I would start by removing all partitions of Table1 (via "ALTER TABLE DROP PARTITION nom_partition Table1"), but when the script came to the last partition, I got this error message:
ORA-14083: cannot delete the only one partition of a partitioned table
ORA-06512: at "SYS." DROP_PARTITIONS', line 46
If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?
Thanks in advance for any guidance.
If someone could advise as to the best approach to what I want to achieve with regard to the two tables? Two tables down and recreate them then without partitions would be the easiest way?
Yes - delete the tables and re-create them.
As says the exception that you cannot delete the last partition. A table is partitioned either or it is not.
There was no interest at all to use DBMS_REDEFINITION to redefine tables because you do not want the data anyway.
-
Size of the data in a table and the size of the table
I am trying to determine the size of the data in a table and also the overall table size. I use the following query:
SELECT BOTTOM (a.owner) as owner,
LOWER (a.table_name) AS table_name,
a.tablespace_name,
a.Num_Rows,
ROUND ((a.blocks * 8 / 1024)) AS size_mb,
a.Blocks,
a.Blocks * 8 Blocks_Kilo_Byte.
a.PCT_FREE,
a.compression,
a.Logging,
b.bytes / 1024 / 1024
From all_tables a, dba_segments b
WHERE the a.owner AS SUPERIOR ("USER_TEST")
AND a.table_name = "X_TEST_TABLE."
AND b.segment_name = a.table_name
AND b.owner = a.owner
ORDER BY 1, 2;
Is this the right way to go about finding the size of the data in a table? If this isn't the case, please give your suggestions.
BTW, this in a 10g version.You probably want to use the DBMS_SPACE package. In particular, the procedures SPACE_USAGE and UNUSED_SPACE to get an accurate account of the use of space in a table. Your application may give you a relatively accurate estimate if the optimizer on your table's statistics are reasonably accurate estimates. But there is no guarantee that the optimizer statistics are accurate.
If you want just an approximate answer and you're comfortable that your statistics are accurate, this query may be close enough. If you want a specific response, however, use the DBMS_SPACE package.
Justin
-
Kindly help me with the request to find the data in two tables
Hello Guru
Kindly help me to recover the data from two tables-
BASEBALL
LEGAL_ENT_ID (PK)
GAME_ID (FK)
LEGAL_ENT_NM
INACTIVE_DT
DATE OF INS_TS
INS_LOGIN
DATE OF UPD_TS
UPD_LOGIN
FOOTBALL
GAME_ID (PK)
BRKR_NM,
BRKR_ISR_ID
BROKER_SYMBOL
INACTIVE_DT
BRKR_SWIFT_FLG
BRKR_INTERNAL_FLG
BRKR_CATEGORY
UPD_TS
MINORITY_FLG
BROKER_TYP
STATUS
INS_TS
INS_LOGIN
UPD_LOGIN
APP_USER
ACTIVE_FLG
and if I want fecth data from these two tables according to the following condition then it is fine with the suite of applications.
1 select distinct values only table of BASEBALL by using the following query.
SELECT DISTINCT B.GAME_ID as 'CLEARING GAME ID', B.BRKR_NM "NAME of THE GAME of COMPENSATION" OF BASEBALL A, FOOTBALL B WHERE A.BROKER_RELATION_CD IN ('FUTBRKR1', 'FUTBRKR2') AND A.GAME_ID = B.GAME_ID
2 Select all the table BRKR_NM OF FOOTBALL as well by using the query - next
SELECT GAME_ID "RUNNING GAME ID", 'NAME OF THE GAME OF EXECUTION' BRKR_NM SOCCER
Now, my query is that--
I want a query that gives me a combination of above mentioned queries... and if I tried to use Union or Union All, then she is not giving me the result as expected.
I like the result to look like who has a few conditions such as -
1 - the records in the table Football are high vs Baseball table because there is no condition to filter the records of the Football.
2 - football is a superset of records and Baseball is a subset.
3 - COMPENSATION NOM_JEU and RUNNING NOM_JEU may return the same values as well.
I want the result to be in the following form-
EXECUTION ID GAME | NAME OF THE GAME TO RUN. COMPENSATION ID GAME | DELETE THE NAME OF THE GAME.
2123 test1 2345 test5
2456 test10 2456 test10
Thanks in advance. Kindly help me.
Published by: user555994 on January 4, 2011 23:48In the output you want.
All the values of baseball;
Values of football that are matched;
But on what condition you want to match? -
Inventory of the data of all Tables in a database
Hello
We do the analysis of the existing data base (Oracle 10 g) and I want to prepare an inventory of the data of all tables in a database that is
1. total number of records in a table
2. total number of records that have null values in a column
3. total number of standalone tables IE have no connection with other tables
etc...
Please let me know if there are tools or query that can do these tasks.
Thank you and best regards,
Lokeshselect owner "Owner", table_name "Table_Name", column_name "Column_Name", initcap(data_type) || decode(data_type, 'CHAR', '('|| char_length ||')', 'VARCHAR', '('|| char_length ||')', 'VARCHAR2', '('|| char_length ||')', 'NCHAR', '('|| char_length ||')', 'NVARCHAR', '('|| char_length ||')', 'NVARCHAR2', '('|| char_length ||')', 'NUMBER', '('|| nvl(data_precision,data_length)|| decode(data_scale,null,null, ','||data_scale)||')', null) "Type", nullable "Nullable", decode(to_char(num_distinct), 0,'No', 'YES') "Have Data", owner sdev_link_owner, table_name sdev_link_name, 'TABLE' sdev_link_type from sys.dba_tab_columns where (:OWNER is null or instr(owner,upper(:OWNER)) > 0) and (:TABLE_NAME is null or instr(upper(table_name),upper(:TABLE_NAME)) > 0) and (:COLUMN_NAME is null or instr(upper(column_name),upper(:COLUMN_NAME)) > 0) and substr(table_name,1,4) != 'BIN$' and substr(table_name,1,3) != 'DR$' order by owner, table_name, column_id
I added a new column with an alias "get data". This new column will display "NO" is the entire column is zero and 'YES' if there is even a value not null in the column. But caution is that statistics table must be updated to get the correct results.
Thus, it may be useful to gather current statistics before executing the query.
Exec dbms_stats.gather_schema_stats or even dbms_stats.gather_database_stats.
-
problem with the storage of the data in the table
Hello
I'm having the problem on the storage of data in the table. My problem is that whenever he makes a loop, the table just keep replacing them rather save to the next index. At 0, the value is 123, and 1 is 234. But I saw that all the data capture all crush to 0 until the last data see the 0. How can I fix this problem?
-
Save the data in another table
Hello, I would like someone to help me with a problem I have in my program.
What makes the program is, for each iteration, take the data in 'table iter' and recorded in "table of output." But in the second iteration instead of storing the results of the first iteration offer me '1' in the first five lines.How can I solve this problem?
Thank you, Jaime
Hi pescajaime,
Please make the change mentioned in the attachments.
Thank you and best regards,
srikrishnaNF
-
mirror of the data in a table separated through trigger
Oracle 11g r2.
Table_account holds public user and professional info for registration (public username, name, address, logo)
(this table can contain 1 million records)
Table_skill(Technician Name), table_skill_child, table_skill_grand_child, table_skill_ext
When the search for technical info, the sql will be executed against the Table_skill. However, given that I also need to get the company name, address and information of logo with the technician information, there are two approaches:
(1) join Table_account and Table_skill, table_skill_child, table_skill_grand_child, table_skill_ext
Select the name of the technician, name, address, company logo
Table_account Table_skill, table_skill_child, table_skill_grand_child, table_skill_ext
where the...
PRO: simple join
CON: public user info is not necessary at all (this could potentially slow down the query speed?)
(2) reflect the data, that is when the company data to the Table_account, use relaxation to copy the name of the company, save him address and logo on the Table_skill. When looking for technicians, it will be fast, no need to exclude the public user names the table_account
Select the name of the technician, name, address, company logo
of Table_skill.
table_skill_child, table_skill_grand_child, table_skill_ext
where the...
PRO: table_account, which contains the unwanted public modules is eliminated
CON: deduplication of data for example, the logo in several tables
Want to hear your opinion.
Thank you
Scott
Hi, Scott.
scottjhn wrote:
Oracle 11g r2.
Table_account holds public user and professional info for registration (public username, name, address, logo)
(this table can contain 1 million records)
Table_skill (name)
When the research is done, the sql will be executed against the Table_skill. However, given that I also need to get the company name, address and logo information, there are two approaches:
(1) join Table_account and Table_skill
Select the name of the technician, name, address, company logo
of Table_account Table_skill
where the...
PRO: simple join
CON: public user info is not necessary at all (this could potentially slow down the query speed?)
(2) reflect the data, that is when the company data to the Table_account, use relaxation to copy the name of the company, save him address and logo on the Table_skill. When looking for technicians, it will be fast, no need to exclude public usernames
Select the name of the technician, name, address, company logo
of Table_skill
where the...
PRO: a table involved
CON: duplicate data, such as the logo in several tables
Want to hear your opinion.
Thank you
Scott
Another "con" is the difficulty of maintaining the data. As you say, the performance will be better when doing a query that contains the replicated data, but DML will be slower. Depending on how often you are DML and how many times you make queries that would benefit the denormalization, the benefit may or may not justify the costs.
There are many problems involved with triggers, in addition to the performance. A materialized view can be a better option, especially if you can tolerate slightly obsolete results (i.e. ' stale').
This sort of thing is often done in Data Warehouse applications, where DML is frequent. Search for the words "Data Warehouse", "Denormaliztion" and "Réplication" to learn more about the subject.
Most of the time, people join in situations like yours.
-
storage of the data output of while loop
Hello
I have a data acquisition system set up to read the couple of a transducer. The output needs to be fed with an excel document, once the program stops running, or when a key is pressed.
with the current code attached, the excel document is created, but it only shows the most recent series of data. How to make the table to store all the data coming from while loop?
Ive only been programming with labview for two weeks, so chances are that it is something simple, but please help us in any case.
JM
To get what you expect, the Terminal output of table a while loop right click and select the option activate Indexing. Usually if you want to save data use queue to pass data inside the while loop to another loop/VI and perform data recording. For all that you have examples, please do a searc in LabVIEW help > find examples.
-
I would like to perform an FFT on a digital signal periodic sampling. For the moment, my signal is stored as an array of 16-bit integers (0-65534) item 8192.
I tried to connect this table directly at the entrance of the fft.vi X, but the data that comes out of the FFT {X} seem little logic (table length 8192 with spikes, the beginning and the end of it).
Any advice would be much appreciated.
Okay, that's better
The reason why you don't see the desired result of FFT is easy:
(a) you have a shift of 8000 to your signal. He is peaking at 0.
(b) your signal includes approximately 2.6 times. Given that the FFT concatenates virtually your signal from - inf to + inf in the time domain, your signal a 'jump' inside that create spikes in your field of frequency 'somewhere '. To prevent this, you can either use windowing or cut the signal of your time domain to contain a whole number of periods (which would then along 6400 samples).
hope this helps,
Norbert
-
How to get the default path of the data of a table space file
I used below the sql statement to create a table space:
CREATE A TABLESPACE DATAFILE AAA BBB SIZE 10 M AUTOEXTEND OFF...
Notice, I do not give a full path instead of a file name, and then ask questions relevant to tables
get the full path of the data file, assume that it's path below:
d:\oracle\...\BBB
So I don't think that there is a default path that oracle can use it to create the data file. My question
is how to get this default path before creating a table space.
Thank you very much.
Hello
I did similar simulations for you, then it could be seen easily:
SQL > Show parameter db_create_file_dest
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_create_file_dest chain
SQL > SELECT NAME, VALUE OF V$ PARAMETER
2 where lower (name) = "db_create_file_dest;
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
db_create_file_dest
It has the value NULL. Then where my datafile is going?
SQL > create tablespace TEST datafile 'test01.dbf' size 10 M;
Created tablespace.
SQL > select file_name
2 of dba_data_files
3 where nom_tablespace = 'TEST ';
FILE_NAME
--------------------------------------------------------------------------------
/U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf
When you check the alert logs, it will not show you the location of the data file. It will tell you what exactly you ran.
..
..
Completed: drop tablespace test whose content and data files
create tablespace datafile 'test01.dbf' size 10 M TEST
Completed: create tablespace TEST datafile 'test01.dbf' size 10 M
..
..
You can not SQL user * more? Well, I would say that, when you run the CREATE TABLESPACE command, is where you run the command:
SQL > select file_name
2 of dba_data_files
3 where nom_tablespace = 'TEST ';
FILE_NAME
--------------------------------------------------------------------------------
/U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf
So, you should get the location of your data file. Alternatively, you can run the query in the parameter $ v so that you know your default data file location.
I hope this helps.
Thank you.
Kind regards
Gaetan
-
local storage in the data store
I have 4 ESXi 5.5 cluster nodes (host1, 2... 5) + 3par storage, I noticed that the local drive of host2 is detected as a data store.
When I create a VM and I choose the data store, I can see all data related to my on3par LUN stores but it seems this drive local host2 too!
I would like to remove it! Can you offer me please?
You must hide hide this data store using permissions, you must run the following procedure: Open-> inventory-> warehouses vSphere-> select the select data-> permissions VMFS store-> click the user or group in the list and set them to 'No access' - are not propagated.
Once achieve you its judgment showing everywhere.
Maybe you are looking for
-
I have a Compaq Presario CQ56 CQ56-219WM laptop He just started to ask for a password "Administrator" or "Power On" password After 3 tries, I get this message. Disabled system [73965989] What should I do? Please help and thanks in advance.
-
My Epson Stylus 610 says to replace the ink cartridges, but I just put in new cartridges Epson
My Epson Stylus 610 said to replace the ink cartridges, but I had just put in the new Epson cartridges. I have it reset, and I tried to clean up the area, but still the same message and cannot work around. My drivers are supposed to be updated. I can
-
The Task Manager is now just 'CPU' because I must have hit something wrong. I was hoping just to click on the tab use the CPU in the Task Manager, now somehow when I hit CTRL, remove alt. it shows only the CPU usage graph.
-
I work in Windows Movie Maker. I imported the pic of a flash drive files. When I return to my project overnight the pictures do not exist. They don't last load because the 'not found' files, mysteriously images loaded back up everything. I have
-
XPS 14 L1421X continues to lose the wifi settings. I see the WiFi on the W10 login screen, but once connected, there is no icon of wifi on the taskbar and go to the network settings, there is no option of wifi. The last time I plugged the cable ether