Data from 2 database blocks insert into the same base table?
Hello,
I have canvas C_NEW. On this canvas, items from 3 blocks are usable by the user.
1. Block NEW_HEAD: 3 items say X1,X2,X3
2. Block NEW : multi record text fields say Y1 thru Y10. Also a scrollbar.
3. Block NEW_ACTION: 6 buttons say B1 thru B6 (One of them is N_OK which is the item in question)
both the blocks NEW, NEW_HEAD are db blocks and have the same base table say BT. When the users click on the N_OK (after filling out the data in the NEW_HEAD block and then NEW in that order) I need the data from both the NEW, NEW_HEAD to go into the BT. Currently only the data from the NEW is going into BT. Fields in the BT table which correspond to the fields X1,X2,X3 in the NEW_HEAD remain null after clicking the N_OK button. I put commit_form in the N_OK code since both the blocks are db blocks( and as suggested by folks, it is easier to issue a commit_form than do a lot more work in writing my own SQL).
How can I achive this?
Thanks,
Chiru
I tried doing what you suggested by putting the following code in the program unit which gets called when_button_pressed.
PROCEDURE P_SAVE IS
v_lc_no number;
v_lc_seq number;
v_dmg_allow number;
BEGIN
Go_Block('B_new_head');
v_lc_no:= :B_new_head.N_LC_NO;
v_lc_seq:= :B_new_head.N_LC_SEQ;
v_dmg_allow:= :B_new_head.N_LC_DMG_ALLOW;
Go_Block('B_new');
FIRST_RECORD;
LOOP
emessage('before insert'||v_lc_no||'-'||v_lc_seq||'-'||:B_new.order_no);
INSERT INTO ct_lc_import(
LC_NUMBER,
LC_SEQ,
DAMAGE_ALLOWANCE,
ORDER_NO,
QTY_SHIPPED,
UNIT_PRICE,
DRAFT_AMOUNT,
TICKET_DEDUCTION,
SHIPMENT_PENALTY,
TOTAL_DEBIT,
DEBIT_DATE)
VALUES (v_lc_no,
v_lc_seq,
v_dmg_allow,
:B_new.order_no,
:B_new.qty_shipped,
:B_new.unit_price,
:B_new.draft_amount,
:B_new.ticket_deduction,
:B_new.shipment_penalty,
:B_new.total_debit,
:B_new.debit_date);
commit;
NEXT_RECORD;
if :SYSTEM.LAST_RECORD='TRUE' then
emessage('last record');
EXIT;
end if;
--NEXT_RECORD;
END LOOP;
EXCEPTION
when FORM_TRIGGER_FAILURE then
raise;
when OTHERS then
emessage(SQLERRM);
raise FORM_TRIGGER_FAILURE;
END;But I can't see the records in the table eventhough the message pops up with the values before inserting the 1st record. It then exits. I would think it would atleast insert the very first record into the the table at the least.
Thanks,
Chiru
Similar Messages
-
Get the data from excel and insert into the database
I want to read the data from excel file, get the data from excel and insert into the database.
You can use the Apache POI HSSF API to read data from Excel files and you can use the Sun JDBC API to insert data in database.
This has nothing to do with JSP/JSTL. -
How to extract data from xml and insert into Oracle table
Hi,
I have a large xml file. which will have hundreds of the following transaction tags having column names and there values.
There is a table one of the schema with coulums "actualCostRate","billRate"....etc.
I need to extract the values of these columns and insert into the table
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuUK" chargeCode="LCOCD1" externalID="L-RESCODE_UK1-PROJ_UK_CNT_GBP-37289-8" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-12" transactionType="L" units="11" taskID="5017601" inputTypeCode="SALES" groupId="123" voucherNumber="ABCVDD" transactionClass="ABCD"/>
<Transaction actualCostRate="0" billRate="0" chargeable="1" clientID="NikuEU" chargeCode="LCOCD1" externalID="L-RESCODE_US1-PROJ_EU_STD2-37291-4" importStatus="N" projectID="TESTPROJ" resourceID="admin" transactionDate="2002-02-04" transactionType="L" units="4" taskID="5017601" inputTypeCode="SALES" groupId="124" voucherNumber="EEE222" transactionClass="DEFG"/>Re: Insert from XML to relational table
http://www.google.ae/search?hl=ar&q=extract+data+from+xml+and+insert+into+Oracle+table+&btnG=%D8%A8%D8%AD%D8%AB+Google&meta= -
I would like to import two different cf cards from two different cameras into the same project/folder and have them be in the order of the times they were taken, any ideas on how to do this?
Just import them normally and sort the project by date. They will fall into place. If you tried this and it isn;t happening then make sure the data and times on the two cameras are identical and make sure you are sorting by date and time and nothing else.
-
I would like to plott data from a text file in the same way as a media player does from a video file. I’m not sure how to create the pointer slide function. The vi could look something like the attached jpg.
Please, can some one help me?
Martin
Attachments:
Plotting from a text file like a media player example.jpg 61 KBHI Martin,
i am not realy sure what you want!?!?
i think you want to display only a part of the values you read from XYZ
so what you can do:
write all the values in an array.
the size of the array is the max. value of the slide bar
now you can select a part of the array (e.g. values from 100 to 200) and display this with a graph
the other option is to use the history function of the graphes
regards
timo -
How do I put all the songs from a compilation album into the same /album/folder in Itunes v12 i know in other versions it was via get info but as all of the tunes have the same album title , I am not sure what tio change to achieve this ?
I don't see your screenshot but I assume you're starting with something like this, i.e., the compilation split into multiple albums:
If you select all the items that you want to be in a single album, right-click > Get Info you'll see this:
As you say, in iTunes 12 you don't see a field to enter a distinct Album Artist value. You can, however, address this by clicking the Add Field button and selecting Album Artist:
That makes the field available in the metadata dialog so that you can enter the required value:
You can also show the pre-iTunes 12 version of the dialog by holding the SHIFT key when selecting Get Info - this allows you to enter the Album Artist directly: -
How do i print pictures from a disc inserted into the Apple Superdrive connected to the 2011 MacBook Air by USB port? Thanks
How do i import them? The only place i can find them is on "Finder" and I don't know how to get them to a place where I can print them.
-
Retrieve data from other context node within the same context
Hi Experts,
I want to redefine method BUILD_TABLE for a table context node and I need to access data from another context node within the same context. I have looked through the methods of class CL_BSP_WD_CONTEXT_NODE_TV but could not find a mean of retrieving the other context nodes.
Any ideas?
Thanks a lot. Your help is appreciated.
Cheers,
JensHi Jens,
Check this [wiki|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=201066680] it should be helpful.
Regards,
Shobhit -
Reading xml data from url and insert into table
CREATE TABLE url_tab2
URL_NAME VARCHAR2(100),
URL SYS.URIType
INSERT INTO url_tab2 VALUES
(’This is a test URL’,
sys.UriFactory.getUri(’http://www.domain.com/test.xml’)
it is giving error as invalid characterCheck if your single quotes are the correct single quotes.
The principle works as advertised in the XMLDB Developers Guide...
C:\>sqlplus / as sysdba
SQL*Plus: Release 11.1.0.7.0 - Production on Tue Nov 25 21:44:46 2008
Copyright (c) 1982, 2008, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user OTN identified by OTN account unlock;
User created.
SQL> grant dba, xdbadmin to OTN;
Grant succeeded.
SQL> conn OTN/OTN
Connected.
SQL> CREATE TABLE uri_tab (docUrl SYS.URIType, docName VARCHAR2(200));
Table created.
SQL> -- Method SYS.URIFACTORY.getURI() with absolute URIs
SQL> -- Insert an HTTPUri with absolute URL into SYS.URIType using URIFACTORY.
SQL> -- The target is Oracle home page.
SQL> INSERT INTO uri_tab VALUES
2 (SYS.URIFACTORY.getURI('http://www.oracle.com'), 'AbsURL');
1 row created.
SQL> -- Insert an HTTPUri with relative URL using constructor SYS.HTTPURIType.
SQL> -- Note the absence of prefix http://. The target is the same.
SQL> INSERT INTO uri_tab VALUES (SYS.HTTPURIType('www.oracle.com'), 'RelURL');
1 row created.
SQL> -- Insert a DBUri that targets employee data from database table hr.employees.
SQL>
SQL> INSERT INTO uri_tab VALUES
2 (SYS.URIFACTORY.getURI('/oradb/HR/EMPLOYEES/ROW[EMPLOYEE_ID=200]'), 'Emp200');
1 row created.
SQL> SELECT e.docUrl.getCLOB(), docName FROM uri_tab e;
E.DOCURL.GETCLOB()
DOCNAME
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
<head>
AbsURL
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
E.DOCURL.GETCLOB()
DOCNAME
<head>
RelURL
<?xml version="1.0"?>
<ROW>
<EMPLOYEE_ID>200</EMPLOYEE_ID>
<FIRST_NAME>Jenn
Emp200
SQL> set long 1000
SQL> select HTTPURITYPE('www.oracle.com').getCLob() from dual;
HTTPURITYPE('WWW.ORACLE.COM').GETCLOB()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN
">
<html>
<head>
<title>Oracle 11g, Siebel, PeopleSoft |
Oracle, The World's Largest Enterprise S
oftware Company</title>
<meta name="title" content="Enterprise Applications | D
atabase | Fusion Middleware | Applicatio
ns Unlimited | Business | Oracle, The Wo
rld's Largest Enterprise Software CompanEdited by: Marco Gralike on Nov 25, 2008 10:13 PM -
Mix source data with different granularity into the same fact table?
I have two transaction tables "Incident (157 columns)" and "Unit (70 Colums)". For every "Incident" that happens there could be one or more records in the "Unit" table.
As part of my data mart design, I have merged both the tables into a single Fact "Incident Fact (227 Columns)" and inserted the records from both the tables with a join condition between them [incident.IN_NUM = Unit.IN_NUM].
Is this correct, is my question? or am I mixing source data with different granularity in the same fact table. Appreciate your help.
Best Regards
BeesBees,
Are the measures from 'Incident' , repeated for a given incident where it has more than one record in the Unit table ? If so, then the sum(indicent.measure) will give an incorrect result, no ?
What requirement is there to physically merge the tables together outside of OBIEE? With OBIEE you could have one logical 'fact' table to present to report users, which sourced from seperate Incidents and Units tables and would stop the incorrect aggregations occuring. A common modelling piece in the same way would be Order Headers and Order Lines, quite common in OBIEE to have a logical 'Orders' fact which contained both Order header measures and Order line measures, this translates to your Incidents -> Units relationship.
To do what I've mentioned, is relatively straight forward, you need a 'Dim - Incident' with two levels, Incident and Unit, mapp the unique identifiers in as the level keys and then use these levels to set the content levels correctly in your 2 logical tables sources for logical 'Fact' , ie Incidents LTS at incident level, Units LTS as units level.
Hope this helps, let us know if you get stuck.
Cheers
Alastair -
Error in fetching the data from textfield and inserting to the database..
I'm using Java Swing as front end and MySQL as backend using the netbeans ide..I am trying to fetch the data from the textfiled in the form and insert to the database table.i've skipped the generated code..In the following code i get the erro cannot find symbol "stmt" in the actionPerformed method..
mport java.awt.event.*;
import java.sql.*;
public class BarcodeReader extends JFrame implements ActionListener {
public BarcodeReader() {
initComponents();
nb.addActionListener(this);
public void jdbcConnect(){
Connection con=null;
String url = "jdbc:mysql://localhost:3306/";
String db = "mynewdatabase";
String driver = "com.mysql.jdbc.Driver";
String user = "usrname";
String pass = "pwd";
try{
String s=newtxt.getText();
con=DriverManager.getConnection(url + db, user, pass);
Statement stmt=con.createStatement();
Class.forName(driver);
public void actionPerformed(ActionEvent e){
try{
jdbcConnect();
stmt.executeUpdate("INSERT into machine(mname) values '"+jTextField1.getText()+"'");
}}catch (Exception ex) {
System.out.println(ex);
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new BarcodeReader().setVisible(true);
}There are far too many errors to try and clear.
For one, the exception references the actionPerformed method (according to your text), so why is that not shown here?
For another you are performing, possible time-consuming, actions, and even worse IO actions, on the event thread, which is a huge no-no.
You are not closeing your resources properly, if at all, which is another huge no-no.
You are completely mixing your "view" (the gui), and your "model" (the data related classes), which is another huge no-no.
etc, etc, etc. -
How to Insert data from an XML file into an Oracle 10g table
Hello,
Please can you help me as I have hit a brick wall with this problem.
We are running version 10g Oracle and we will start receiving XML files with employee data that needs loading into a table, this is the XML file:
<?xml version="1.0"?>
<RECRUITS>
<RECRUIT>
<FIRST_NAME>Gordon</FIRST_NAME>
<LAST_NAME>Brown</LAST_NAME>
<SHORT_NAME>GORDONBROWN</SHORT_NAME>
<APP_NO>00002</APP_NO>
<STATUS>M</STATUS>
<DATE_FROM>21-JUL-2006</DATE_FROM>
<RESOURCE_TYPE>P</RESOURCE_TYPE>
<TITLE>Mr</TITLE>
<DATE_OF_BIRTH>28-DEC-1983</DATE_OF_BIRTH>
<SOCIAL_SEC>AB128456A</SOCIAL_SEC>
<PARTTIME_PCT>1</PARTTIME_PCT>
<SEX>M</SEX>
<ADDRESS_TYPE>1</ADDRESS_TYPE>
<ADDRESS>A HOUSE SOMEWHERE HERE</ADDRESS>
<ZIP_CODE>PE3 LLL</ZIP_CODE>
<PLACE>BOROUGH</PLACE>
<COUNTRY_CODE>UK</COUNTRY_CODE>
<PROVINCE>UK</PROVINCE>
<EMAIL>[email protected]</EMAIL>
</RECRUIT>
(FYI - there may be more than 1 employee in each file so all of the above will be repeated X amount of times)
</RECRUITS>
To make things simple we have created a table which mirrors the XML file completely to load the data into, the SQL i have used is thus:
CREATE TABLE RECRUITMENT
FIRST_NAME VARCHAR2(30),
LAST_NAME VARCHAR2(30),
SHORT_NAME VARCHAR2(30),
APP_NO NUMBER,
STATUS VARCHAR2(1),
DATE_FROM DATE,
RESOURCE_TYPE VARCHAR2(1),
TITLE VARCHAR2(4),
DATE_OF_BIRTH DATE,
SOCIAL_SEC VARCHAR2(9),
PARTTIME_PCT NUMBER,
SEX VARCHAR2(1),
ADDRESS_TYPE VARCHAR2(1),
ADDRESS VARCHAR2(30),
ZIP_CODE VARCHAR2(8),
PLACE VARCHAR2(10),
PROVINCE VARCHAR2(3),
EMAIL VARCHAR2(20)
Every method we try from the numerous documents and so called "user guides" have failed, please can somebody show me the PL/SQL i need to get this files data into the above table?
We need to be able to do this purely through SQL*PLUS as we hope - if we ever get it working manually to create a procuedure that will encapsulate everything so it can be run over and over again.
The XML file is sitting in the XMLDIR and is called REC.XML.
Please help : (Hi, I have got some material for inserting data into oracle table from xml file, this might help you.
Create XML Document Table
create table XML_DOCUMENT_TABLE
FILENAME varchar2(64),
XML_DOCUMENT XMLTYPE
(This will be as per your record details).
Inserting record to Oracle Table
declare
XML_TEXT CLOB := '<smsnotification>
<messageid> 256427844 </messageid>
<protocolid> CO0NPS2KHQ </protocolid>
<notifiedon> 1156123007416 </notifiedon>
<status> 3PBI: Invalid </status>
<additionalinfo> Customer account not active </additionalinfo>
<carrierid> 1175 </carrierid>
</smsnotification>';
begin
insert into XML_DOCUMENT_TABLE values ('Receipt.xml',XMLTYPE(XML_TEXT));
end;
Select Statement
select extractValue(XML_DOCUMENT,'/smsnotification/messageid') Messageid,
extractValue(XML_DOCUMENT,'/smsnotification/status') Status,
extractValue(XML_DOCUMENT,'/smsnotification/carrierid') CarrierID
from XML_DOCUMENT_TABLE; -
Can photos in albums from iPhone be organized into the same album on Mac?
I have set up IFTTT to save photos I am tagged in from Facebook and add them to an album "Facebook tags" on my iPhone. When I sync my iPhone to my Mac, I would like for these photos to also be placed in an album on my Mac called "Facebook tags". Is this possible? Right now, when I sync my iPhone, the photos just get included with other photos that are from my camera roll.
You can solve this problem by making use of BOTH the "artist" field and the "album artist" field in iTunes. In 95% of cases, they will be identical. But when there are issues like you described -- the occasional guest artist, etc. -- then let the "artist" field handle that. And let the "album artist" be the name of the main artist on the album. Make sure all the songs in the album have the same "album artist", even if some of the songs have different "artists." Your album will now contain all the songs. I also utilize this feature when I am uploading a classical CD. I use the artist field for the conductor, symphony orchestra, pianist, etc., who is actually performing on the album. But I use the album artist for the actual composer of the music -- Beethoven, Chopin, Tchaikovsky, etc. This works well, too.
-
Getting data from Multiple cDAQ racks at the same time.
I need to combine an 8 port cDAQ rack and a 4 port cDAQ rack and was hoping someone can help. I do not need the signals to be synced up exactly, but I can’t handle the 50ms delay that I have now. The signals on the 2nd rack is more for customer reference and the 1st rack is doing all the real analyzing.
I need to collect samples at 500hz or every 2ms and I collect 25 samples giving me a chunk of data every 50ms. The DAQmx tasks seem to pull at the same time, therefore the cDAQ2 In chunk is always 1 scan behind causing a 50ms delay.
Is there a better way to pull this data without having such a large delay? I did not see anything in the examples that apply to my particular application and hardware.
Thanks,
DougEach task will begin sampling data as soon as you start each task, so in order for each task to be synced, you want each start task to occur at as close to the same time as possible. One way to try to do this is to put the start tasks together in a sequence structure. This will ensure all your cofiguration steps for both tasks are complete before you start sampling. How long are you runnig your application for? If its not that long, I wouldn't worry about one of your chassis running faster than each other. If you think that is becoming a problem, there are ways to diagnose that, but that would take a significant amount of effort.
I have included a snippet of how you can try starting your tasks together
Applications Engineer
National Instruments
Attachments:
start tasks together.png 21 KB -
How to save data from a server log to the java dictionary table?
Hi,
I need a java dictionary and a program which will read data from the log file and save records into tables.
Can somebody help how to achieve this? Please help!
Thanks & regards
AmitaHi folks, Give some inputs here....
Thanks & regards
Amita
Maybe you are looking for
-
Problem with IE8 popup blocker and Windowless mode
My team is having popup blocker issue, which is crippling our system where a large range of users are now complaining that their links or buttons will not open in IE7 or IE8 and results in the pop-up blocker message. Our Flash application's embed cod
-
In trying to edit a track - I want to "Delete and Move" the track to automatically fill the area that I deleted - However, after selecting a section to delete - the "Delete and Move" option is grayed out. How do I fix this?
-
Slideshow Titles don't display; Music not controlled.
The Apple TV does not show titles on slideshows that I created in Macbook and synced to Apple TV. The music I chose for the slideshows is not the same as I selected on my Macbook - kind of random selection from the Apple TV Playlist. How can I get Ap
-
Email notification missing on C7
I've bought a new C7-00 recently and noticed that new email arrivals are not notified with "@" symbol on the home screen (like for 'missed-calls' and SMS). I however get tone alerts on new email arrivals. This used to work on my previous nokia (5233
-
Active window bar, menu bar missing or hidden
Today after opening a PDF, my active window bar (at the top) and the Acrobat menu bar wouldn't display. It's Acrobat 9.5.5. Instead of giving me the normal active window bar and menu bar, it would give a gray Acrobat buttons menu. Each time I get it