Populate a table in a wordtemplate
Hallo,
I need fill a table in a word with the measurement data template.
I bookmarked the table in the model (it has 2 columns and 5 rows).
The following test failed:
Can someone help me?
Thank you
Check out thisthread if your using Word2010.
Norm
Tags: NI Software
Similar Questions
-
How to create and populate a table of specific size
How can I write a script in a table to a specific size?
MattIf you want to exactly hit the mark 5 MB or do you not care as long as you exceed 5MB?
If all you want to do is more than 5MB create a table in the desired table space:
CREATE TABLE big (id number, filler varchar2(1024)) TABLESPACE your_table_space STORAGE (INITIAL 4M NEXT 1M);
Then insert a bunch of folders:
insert into big (select level, rpad('x', 1024, 'x') from dual connect by level <= 5*1024);
That should do it.
-
Failed to populate the tables using StartSQLRepository.
Hi Experts,
I use ATG 10.0.3 with application server 10.3.6 Weblogic and Oracle 10 g db.
While trying to use data startSQLRepository m MyModule-import \config\dynamusic\mymoduledata.xml-referentiel/atg/commerce/catalog/ProductCatalog fill command I get after errors.
Path: C:\oraclexe\app\oracle\product\10.2.0\server\bin; C:\Program Files\Java\jdk1.6.0_20\bin; C:\apache-ant-1.9.2\bin; C:\ATG\ATG10.0.3\MySQL\win32\bin;. \.. \DAS\os_specific_files\i486-unknown-Win32;. \.. \DAS\os_specific_files\i486-unknown-win32\ice
Error my Sep 21 13:19:10 IST 2013 1379749750141 /atg/dynamo/service/jdbc/JTDataSource---javax.naming.NoInitialContextException: need to specify the class name in the environment or property of the system, as a cmdlet parameter or in a file of application resources: java.naming.factory.initial
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.lookup(InitialContext.java:392)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.JNDIReference.getReference(JNDIReference.java:140)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.JNDIReference.doStartService(JNDIReference.java:116)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.GenericService.startService(GenericService.java:496)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.startService(NucleusNameResolver.java:1458)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1206)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:826)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:590)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:571)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:416)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:1120)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.ConfigurationRef.getValue(ConfigurationRef.java:81)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.SimpleComponentState.setBeanProperty(SimpleComponentState.java:379)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.SimpleConfigurationState.saveToBean(SimpleConfigurationState.java:218)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.SimpleConfigurationState.configureBean(SimpleConfigurationState.java:241)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.BeanConfigurator.configureBean(BeanConfigurator.java:275)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.PropertyConfiguration.configureService(PropertyConfiguration.java:763)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.SingleNucleusConfigurator.configureService(SingleNucleusConfigurator.java:62)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.configureService(NucleusNameResolver.java:1392)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.configureAndStartService(NucleusNameResolver.java:1192)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:826)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:590)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.createFromName(NucleusNameResolver.java:571)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.NucleusNameResolver.resolveName(NucleusNameResolver.java:416)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.Nucleus.resolveName(Nucleus.java:2536)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.GenericService.resolveName(GenericService.java:315)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.GenericService.resolveName(GenericService.java:367)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.Nucleus. < init > (Nucleus.java:932)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.Nucleus. < init > (Nucleus.java:717)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.Nucleus.startNucleusCheckLicense(Nucleus.java:4144)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.nucleus.Nucleus.startNucleus(Nucleus.java:4021)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.adapter.gsa.xml.TemplateParser.runParser(TemplateParser.java:5625)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource to atg.adapter.gsa.xml.TemplateParser.main(TemplateParser.java:5241)
Error my Sep 21 13:19:10 IST 2013 1379749750141/atg/dynamo/service/jdbc/JTDataSource
Error Sat Sep 21 13:19:10 IST 2013 1379749750221 / failed to start the service "/ atg/dynamo/service/jdbc/JTDataSource ': atg.nucleus.ServiceException: could not resolve the reference to the JNDI component: ATGProductionDS
Error my Sep 21 13:19:10 IST 2013 1379749750229 /atg/dynamo/service/jdbc/JTDataSource---javax.naming.NoInitialContextException: need to specify the class name in the environment or property of the system, as a cmdlet parameter or in a file of application resources: java.naming.factory.initial
Error my Sep 21 13:19:10 IST 2013 1379749750229/atg/dynamo/service/jdbc/JTDataSource to javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
Error my Sep 21 13:19:10 IST 2013 1379749750229/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
Error my Sep 21 13:19:10 IST 2013 1379749750229/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:325)
Error my Sep 21 13:19:10 IST 2013 1379749750229/atg/dynamo/service/jdbc/JTDataSource to javax.naming.InitialContext.lookup(InitialContext.java:392)
I created the JTDataSource.properties, connectionPoolName.properties and the connectionPoolNameFakeXA.properties under the following path: C:\ATG\ATG10.0.3\home\localconfig\atg\dynamo\service\jdbc.
JTDataSource.properties has the following key-value.
$class = atg.nucleus.JNDIReference
JNDIName = ATGProductionDS
connectionPoolNameFakeXA.properties: -.
$class = atg.service.jdbc.FakeXADataSource
Server = localhost:1313
user = system
needsSeparateUserInfo = false
URL=JDBC:Oracle:thin:@localhost:1521:XE
readOnly = false
password = admin
database =
Driver = Oracle.JDBC.XA.client.OracleXADataSource
I tried many things but unable to solve these errors.
Please help fix these errors!
Kind regards
Meera
When you run the startSQLRepository.bat file, you will not have access to the application context server where only the application server JNDI name, not talk. In your case, JTDataSource is pointing to the data source that is set up on your application server. You need point to the FakeXAdataSource of your JTDatasource instead of give the JNDI name.
Your JTDataSource will be like,
$class = atg.service.jdbc.MonitoredDataSource
dataSource =connectionPoolNameFakeXA (with path)
and the FakeXADataSource will be like
$class = atg.service.jdbc.FakeXADataSource
Driver = Oracle.JDBC.OracleDriver
URL =jdbc:oracle:thin:@localhost:1521:xe
user =
> password =
> See you soon
R
-
When I go to a table control of labview to wire to a labview table hint and run the program, the column and row headings are moving from one table to the other. A fix for this is to use the nodes property to the control table column and row headings and their son also to the node property for the column for indicator and row headings.
The challenge is when I dynamically changes rows in table headers and the column headers for each file that I read and populates the table with. As I read in another file, I want to collect the tables in a table for later use. How to collect simple tables with different row headers and column with programming techniques?
ID says:
The table is within a cluster that is in a table. Why can't I have a different table in these clusters of array element? Because of the attributes of table can be different in each cluster?
Each control in a table must have the same properties. This means that all of your tables in the cluster in the table will have the same headers. Of course, you could just put the header data in the data in the table itself, and then you have all the information.
-
No DHCP Table after update of FW of BEFSR41 v4.3
I installed the FW on my BEFSR41 v4.3 to 2.00.4. Everything seems to work, but when I check the Table of DHCP Client there is no entry... zero! I have about six dynamic IP clients, and they are all attached to the network, so that the DHCP server should work. Why is the customer table blank? And, Yes, demotion to the FW 2.00.2 back table.
If the firmware has been updated without having to re - start the DHCP features, I do not think that their addresses would show in the tables.
The router populates the table as devices are requesting addresses. This occurs only when the devices are delivered initially upwards, or detect the router link down to ready state.
Try to re - apply the new Firmware, then re - start one of these computers that use DHCP. Its address must appear in the table.
-
HRMS Absence create Table to replace by field
Hi all
I'm working on alert event concerning the creation of Absence HRMS. During the creation of Absence, the employee will give replace by another employee. So when the employee present the absence of approval, this time we send an email to replace per employee. But I'm not able to find the field table substitute.
I find a Per_Absence_Attendances table, but this will be filled when the absence is approved. But we need prior approval.
When we submit the absence, will populate the tables Hr_Api_Transaction_Steps and hr_api_transactions, but there is no Replace_By field in these tables.
Kindly give me the idea to do.
Thank you and best regards,
Jagadekara Reddy
Hi Jagadekara,
What is your version of the application?
In R12 leave details are stored in transaction_document in the hr_api_transactions table. It should be there.
Kind regards
Kushal
-
When the BOM_CTO_ORDER_LINES table is filled
SOEs does anyone have information about this "BOM_CTO_ORDER_LINES" Oracle table We are trying to determine when this table is filled. We know that the
Automatic configuration process populates the table but when exactly and which API it?
It is updated as soon as the ' * ' element is created.
-
IOM 11 GR 2 - Entilements are removed if the child tables are not met.
Hello experts,
I use the OOTB DBUM connector.
When a user has certain rights assigned to IOM (db, db roles privileges) need to be addressed in the child tables before any account update otherwise they are deleted/revoked.
In other words when the update of a parent account attribute, I need also to populate child tables with payments already assigned, so I leave them blank, all payments will be deleted: empty child tables means "remove all rights", instead, I don't want to change the right assignments.
How can I do this?
Fixed by the creation and use of a new form of resources.
-
Small request help on the use of the global temporary table - some doubts
Hi allFew days back according to a condition, I used a TWG (on the ranks of commit preserve).
I created a trigger (before the insertion of line level) on GTT that calls a procedure (pragma autonomous transaction declared in the procedure).
Procedure inserts data into two tables and I have a validation final (after the two insertion of data in tables) in the procedure.
I tested by inserting the number of lines in TWG and found that the two tables are correctly supply procedure called by trigger.
Which means that my works absolutely perfect functionality. (performance is also good)
Now, my question is: since in the production source ETL tool will load this TWG.
ETL will use this table in different processes simultaneously.
Suppose that a single session ETL populates this table, and at the same time in parallel another session fills this table with different data. is there a lock on this TWG?
Would the TWG is blocking other lines to add at any time?
Is it possible that data may disappear without completing the entire process prematurely TWG?
PS the feature I developed is the generic exception feature. This works for all valid tables for the database. For most of the tables will be filled with ETL, that's why I had these doubts in my mind.
I apologize, if these seems like childish doubts.
Thank you very much
Arpit Agrawal
Each line I'll get my GTT and follow all the features [trigger procedure &], will be considered as a session until the validation, right?
This is not correct, a session is considered between the opening of session (session is created) and close the session (session is closed) of the database.
If I use, validation TWG deletions here, how would he had differed on commit preserve as when my feature is completed, I don't want to keep more data.
If on commit delete has been used here, it wouldn't make a difference in your case since you make is ENGAGING in some AUTONOMOUS OPERATIONS.
In both cases, commit delete and commit preserve, you don't have to worry about the data inside the TWG because it will be empty onece you logoff (session ends).
However, you can perform a delete operation in your session if you do not want to keep the data up to the end of the session.
-
Inserting blob in a table: problems
I wanted to insert a picture into the database using PLSQL table. Please let me know if the image file must be on a database server or I can insert it premises as well. Please find below my code and the error I get.
Call to the procedure and the error
My procedure to insert data into the tableBEGIN load_blob_from_file ( 'D:\PRoJeCt-RS\OracleError', 'item', 'item_blob', 'id', '2'); END; BEGIN * ERROR at line 1: ORA-22285: non-existent directory or file for FILEEXISTS operation ORA-06512: at "SYS.DBMS_LOB", line 504 ORA-06512: at "CMSRTPGM.LOAD_BLOB_FROM_FILE", line 18 ORA-06512: at line 2
The table structureCREATE OR REPLACE PROCEDURE load_blob_from_file ( src_file_name IN VARCHAR2 , table_name IN VARCHAR2 , column_name IN VARCHAR2 , primary_key_name IN VARCHAR2 , primary_key_value IN VARCHAR2 ) IS -- Define local variables for DBMS_LOB.LOADCLOBFROMFILE procedure. des_blob BLOB; src_blob BFILE := BFILENAME('GENERIC',src_file_name); des_offset NUMBER := 1; src_offset NUMBER := 1; -- Define a pre-reading size. src_blob_size NUMBER; -- Define local variable for Native Dynamic SQL. stmt VARCHAR2(2000); BEGIN -- Opening source file is a mandatory operation. IF dbms_lob.fileexists(src_blob) = 1 AND NOT dbms_lob.isopen(src_blob) = 1 THEN src_blob_size := dbms_lob.getlength(src_blob); dbms_lob.open(src_blob,DBMS_LOB.LOB_READONLY); END IF; -- Assign dynamic string to statement. -- We are going to obtain the clob locator (pointer) to use later stmt := 'UPDATE '||table_name||' ' || 'SET '||column_name||' = empty_blob() ' || 'WHERE '||primary_key_name||' = '||''''||primary_key_value||''' ' || 'RETURNING '||column_name||' INTO :locator'; -- Run dynamic statement. -- the locator (pointer) to the blob will assigned to des_blob EXECUTE IMMEDIATE stmt USING OUT des_blob; -- Read and write file to BLOB, close source file and commit. dbms_lob.loadblobfromfile( dest_lob => des_blob , src_bfile => src_blob , amount => dbms_lob.getlength(src_blob) , dest_offset => des_offset , src_offset => src_offset ); -- Close open source file. dbms_lob.close(src_blob); -- Commit write and conditionally acknowledge it. IF src_blob_size = dbms_lob.getlength(des_blob) THEN $IF $$DEBUG = 1 $THEN dbms_output.put_line('Success!'); $END ROLLBACK; ELSE $IF $$DEBUG = 1 $THEN dbms_output.put_line('Failure.'); $END RAISE dbms_lob.operation_failed; END IF; END load_blob_from_file;
Thanks in advance!CREATE TABLE ITEM ( "ID" NUMBER, "TITLE" VARCHAR2(50), "ITEM_BLOB" BLOB )
Concerning
34MCA2K2
Published by: BluShadow on June 14, 2012 13:31
addition of {noformat}{noformat} tags for readability. Please read {message:id=9360002} and learn to do this yourself.
Yes,
Start by creating an object directory point to a physical directory on the server database as the 'oracle '.
user has read/write permissions.CONN / AS SYSDBA
CREATE or REPLACE DIRECTORY nom_repertoire as 'D:\Applications ';
GRANT READ, WRITE ON DIRECTORY NOM_REPERTOIRE TO USER_NAME;Here is the diagram user USER_NAME.
Then,.
create and populate a table to contain the images in the database your user to user schema.and try this procedure...
DECLARE l_dir VARCHAR2(10) := 'DIR_NAME'; ----> Is the Directory Object we created. l_file VARCHAR2(20) := 'site_logo.gif'; ----- > The image to be located in the DB Server in the Directory Path DIR_NAME mentioned. l_bfile BFILE; l_blob BLOB; BEGIN INSERT INTO images (id, name, image) VALUES (images_seq.NEXTVAL, l_file, empty_blob()) RETURN image INTO l_blob; l_bfile := BFILENAME(l_dir, l_file); DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly); DBMS_LOB.loadfromfile(l_blob, l_bfile, DBMS_LOB.getlength(l_bfile)); DBMS_LOB.fileclose(l_bfile); COMMIT; END;
Thank you
Shankar -
Import Excel tables in InDesign - char (10)
Hello
I've been putting together a manual intended to circumvent the process stretched having to go through and replace text and variable whenever the manual must be duplicated for a new client/build.
To do this, I have compiled a book in MS Excel consisting of 15-20 sheets, each with a table of variables depending on the section of the manual. These can be filled in the responses of the client accordingly. Example:
I then inserted datatags in the InDesign document, so that a mailing can be executed using one. Copy CSV spreadsheets excel and automatically fill the manual with the values, see below:
My current problem is that in some tables, I have several bullet points which, in Excel, had to be expressed by inserting a ball, and then the text symbol using Alt + Enter to create a break line (so that I can have multiple lines of text in a cell).
Unfortunately, when I run CSV2Tables to pre-populate each table with content from Excel, this break is interpreted by InDesign as a command that starts on a new line - which means that the lymphocytes which contained several lines are imported in InDesign as several lines of text in a line. (see below).
My question is, is there any alternative to the use of Alt + Enter in Excel so that I can still have multiple lines of text in a cell, which can then be imported into InDesign as a line.
OR
Is there a way to change what InDesign picks up as a new symbol of the line - I looked at "Hidden characters" and looked around the internet but have not found a solution for the moment.
Any help would be greatly appreciated.
Remplacer replace by a kind of code of text inline for line breaks, then run find/replace after the merger to convert them into actual breaks.
-
Results output in a single line in a Table
Afternoon people,
I have a scenario by hand, and I was hoping to get some advice. I could write a PL/SQL program and everything would be fine. I was hoping if there was a way to do it in SQL and not necessary to create a new subprogramme for this. I already have a PL/SQL program that populates a table. I now want to use these data and output in some way.
Any help is greatly appreciated and is not something I have to solve this evening. :)
Script to create table and insert records into him:
What I want to do, it's the results by flight number, origine1, Target1, Origin2, Destination 2 and 3 of origin, 3 output Destination. Combinations of numbers maximum per flight is 3. The other condition is that the list should show only the origin and destination and stopover if the time of day it's flight. If it's a red eye, then don't show this option. Record 2 would be completely omitted here because it's a Red Eye flight, and Record 5 may be omitted for origin/Destination/stopover flight UX-2001 3.drop table FLIGHT_ROUTES; CREATE TABLE FLIGHT_ROUTES (FLIGHT_NO VARCHAR2(7), ROUTE_ID NUMBER, DAY_OF_OPERATION NUMBER, ORIGIN VARCHAR2(3), DESTINATION VARCHAR2(3), STOPVER VARCHAR2(3), ROUTE_TYPE VARCHAR2(1) ) / REM INSERTING into FLIGHT_ROUTES Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-1001',1,1,'SFO','LAX',null,'D'); Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-1001',1,2,'SFO','LAX',null,'R'); -- Record 2 Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,1,'SFO','JFK',null,'D'); Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,2,'SFO','JFK','ORD','D'); Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-2001',2,3,'SFO','JFK','DEN','R'); -- Record 5 Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,1,'LAX','JFK','YYZ','D'); Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,2,'LAX','JFK','YYC','D'); Insert into FLIGHT_ROUTES (FLIGHT_NO,ROUTE_ID,DAY_OF_OPERATION,ORIGIN,DESTINATION,STOPVER,ROUTE_TYPE) values ('UX-3001',3,3,'LAX','JFK','YUL','D');
Published by: Roxyrollers on Sep 9, 2011 15:59Flight_No Origin1 Destination1 Stopover 1 Origin2 Destination2 Stopver2 Origin3 Destination3 Stopover3 ============================================================================================================================================================ UX-1001 SFO LAX UX-2001 SFO JFK SFO JFK ORD UX-3001 LAX JFK YYZ LAX JFK YYC LAX JFK YUL
Published by: Roxyrollers on Sep 9, 2011 15:59
Published by: Roxyrollers on Sep 9, 2011 16:00Hello
Assuming that day_of_operation is what determines whether a line is 1, 2 or 3:
WITH got_r_num AS ( SELECT f.* , ROW_NUMBER () OVER ( PARTITION BY flight_no ORDER BY day_of_operation ) AS r_num FROM flight_routes f WHERE route_type != 'R' ) SELECT flight_no || ',' || MAX (CASE WHEN r_num = 1 THEN origin END) || ',' || -- Origin 1 MAX (CASE WHEN r_num = 1 THEN destination END) || ',' || -- Destination 1 MAX (CASE WHEN r_num = 1 THEN stopver END) || ',' || -- Stopover 1 MAX (CASE WHEN r_num = 2 THEN origin END) || ',' || -- Origin 2 MAX (CASE WHEN r_num = 2 THEN destination END) || ',' || -- Destination 2 MAX (CASE WHEN r_num = 2 THEN stopver END) || ',' || -- Stopover 2 MAX (CASE WHEN r_num = 3 THEN origin END) || ',' || -- Origin 3 MAX (CASE WHEN r_num = 3 THEN destination END) || ',' || -- Destination 3 MAX (CASE WHEN r_num = 3 THEN stopver END) AS csv_text -- Stopover 3 FROM got_r_num GROUP BY flight_no ORDER BY flight_no ;
Output:
CSV_TEXT ------------------------------------------- UX-1001,SFO,LAX,,,,,,, UX-2001,SFO,JFK,,SFO,JFK,ORD,,, UX-3001,LAX,JFK,YYZ,LAX,JFK,YYC,LAX,JFK,YUL
It's not assume origine1 is always on the same line with day_of_operation = 1. Origine1 will take place from the line with the day_of_operation, besides the red eyes. Similarly, origin2 will take place of the line with the 2nd day_of_operation below, if this value is 2, or not.
If your data is such that the line containing day_of_operation = n will be necessarily nth one low, not to mention the eyes red, then you don't need the subquery got_r_num; Just use your real of the table (with the route_type WHERE condition! = 'R') and use the day_of_operation where I used r_num. (it's what the solution of Solomon, which I saw,.)Published by: Frank Kulash, Sep 9, 2011 16:47
Published by: Frank Kulash, Sep 9, 2011 16:53
-
How to delete records from a table?
It comes to my table structure:
Here are some insert statements to populate the table. *(About a 100 of them, please Bear with me) *.create table BILLS ( bill_id VARCHAR2(20), trx_no VARCHAR2(20), item_code VARCHAR2(3), amount NUMBER, item_id NUMBER, invoice_dt DATE )
It comes to my select statement.insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104173960', '910873', '002', 432, 351, to_date('04-03-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104209800', '910873', '002', 432, 351, to_date('04-04-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104212747', '263156', '039', 230, 351, to_date('01-04-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104269414', '263156', '039', 230, 351, to_date('01-06-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104360446', '263156', '039', 230, 351, to_date('01-09-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104577673', '910873', '002', 432, 351, to_date('04-04-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104608668', '910873', '002', 432, 351, to_date('04-05-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104611586', '263156', '039', 230, 351, to_date('01-05-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104642560', '910873', '002', 432, 351, to_date('04-06-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104699154', '910873', '002', 432, 351, to_date('04-08-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104820820', '263156', '039', 230, 351, to_date('01-12-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104826028', '910873', '002', 432, 351, to_date('04-12-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104850631', '910873', '002', 432, 351, to_date('04-01-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104885554', '263156', '039', 230, 351, to_date('01-02-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104926901', '910873', '002', 432, 351, to_date('04-03-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104936656', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104996320', '263156', '039', 230, 351, to_date('01-05-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105030104', '263156', '039', 230, 351, to_date('01-06-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105176803', '910873', '002', 432, 351, to_date('04-10-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105217998', '910873', '002', 432, 351, to_date('04-11-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105253306', '263156', '039', 230, 351, to_date('01-12-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105280152', '263156', '039', 230, 351, to_date('01-01-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105318072', '910873', '002', 432, 351, to_date('04-02-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105449712', '910873', '002', 432, 351, to_date('04-06-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105579048', '910873', '002', 432, 351, to_date('04-10-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105611201', '263156', '039', 230, 351, to_date('01-11-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105679991', '263156', '011', 196.56, 351, to_date('06-01-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105686749', '910873', '002', 432, 351, to_date('04-01-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105816473', '910873', '002', 432, 351, to_date('04-05-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105846525', '263156', '011', 230, 351, to_date('01-06-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105778111', '910873', '002', 432, 351, to_date('04-04-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104958496', '910873', '002', 432, 351, to_date('04-04-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105143695', '910873', '002', 432, 351, to_date('04-09-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104176755', '263156', '039', 230, 351, to_date('01-03-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104365552', '910873', '002', 432, 351, to_date('04-09-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104646837', '263156', '039', 230, 351, to_date('01-06-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104763596', '910873', '002', 432, 351, to_date('04-10-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104936656', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105510930', '263156', '039', 230, 351, to_date('01-08-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104302780', '263156', '039', 230, 351, to_date('01-07-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104793590', '263156', '039', 230, 351, to_date('01-11-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104238583', '910873', '002', 432, 351, to_date('04-05-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105779115', '263156', '011', 230, 351, to_date('01-04-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104394481', '263156', '039', 230, 351, to_date('01-10-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105144934', '263156', '039', 230, 351, to_date('01-09-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105342823', '263156', '039', 230, 351, to_date('01-03-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105747780', '910873', '002', 432, 351, to_date('04-03-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105517258', '910873', '002', 432, 351, to_date('04-08-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105617909', '910873', '002', 432, 351, to_date('04-11-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104480711', '910873', '002', 432, 351, to_date('04-01-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105845480', '910873', '002', 432, 351, to_date('04-06-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105349031', '910873', '002', 432, 351, to_date('04-03-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105382599', '263156', '039', 230, 351, to_date('01-04-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104423263', '263156', '039', 230, 351, to_date('01-11-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104482370', '263156', '039', 230, 351, to_date('01-01-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104892872', '910873', '002', 432, 351, to_date('04-02-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105071771', '263156', '039', 230, 351, to_date('01-07-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105716829', '910873', '002', 432, 351, to_date('04-02-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105251149', '910873', '002', 432, 351, to_date('04-12-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105420465', '910873', '002', 432, 351, to_date('04-05-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105547036', '910873', '002', 432, 351, to_date('04-09-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105450806', '263156', '039', 230, 351, to_date('01-06-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105178143', '263156', '039', 230, 351, to_date('01-10-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105648407', '910873', '002', 432, 351, to_date('04-12-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105718070', '263156', '011', 230, 351, to_date('01-02-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104735083', '910873', '002', 432, 351, to_date('04-09-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105748707', '263156', '011', 230, 351, to_date('01-03-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104570555', '263156', '039', 230, 351, to_date('01-04-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105480249', '910873', '002', 432, 351, to_date('04-07-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104799512', '910873', '002', 432, 351, to_date('04-11-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105036878', '910873', '002', 432, 351, to_date('04-06-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105413781', '263156', '039', 230, 351, to_date('01-05-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105548204', '263156', '039', 230, 351, to_date('01-09-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104510445', '910873', '002', 432, 351, to_date('04-02-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104545120', '263156', '039', 230, 351, to_date('01-03-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104700608', '263156', '039', 230, 351, to_date('01-08-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104765006', '263156', '039', 230, 351, to_date('01-10-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105111984', '910873', '002', 432, 351, to_date('04-08-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105310993', '263156', '039', 230, 351, to_date('01-02-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105481415', '263156', '039', 230, 351, to_date('01-07-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105210719', '263156', '039', 230, 351, to_date('01-11-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105809981', '263156', '011', 230, 351, to_date('01-05-2011', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104328833', '910873', '002', 432, 351, to_date('04-08-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104511904', '263156', '039', 230, 351, to_date('01-02-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105278905', '910873', '002', 432, 351, to_date('04-01-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104421567', '910873', '002', 432, 351, to_date('04-11-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104851866', '263156', '039', 230, 351, to_date('01-01-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105649424', '263156', '039', 230, 351, to_date('01-12-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104729022', '263156', '039', 230, 351, to_date('01-09-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105070358', '910873', '002', 432, 351, to_date('04-07-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104299829', '910873', '002', 432, 351, to_date('04-07-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104920099', '263156', '039', 230, 351, to_date('01-03-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104266551', '910873', '002', 432, 351, to_date('04-06-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104994904', '910873', '002', 432, 351, to_date('04-05-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104910999', '263156', '', 15, 247, null); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104241418', '263156', '039', 230, 351, to_date('01-05-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104960203', '263156', '039', 230, 351, to_date('01-04-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105381371', '910873', '002', 432, 351, to_date('04-04-2010', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104542458', '910873', '002', 432, 351, to_date('04-03-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104670160', '910873', '002', 432, 351, to_date('04-07-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105105026', '263156', '039', 230, 351, to_date('01-08-2009', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104392347', '910873', '002', 432, 351, to_date('04-10-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104451005', '910873', '002', 432, 351, to_date('04-12-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104453960', '263156', '039', 230, 351, to_date('01-12-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104671563', '263156', '039', 230, 351, to_date('01-07-2008', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('104331181', '263156', '039', 230, 351, to_date('01-08-2007', 'dd-mm-yyyy')); insert into BILLS (BILL_ID, TRX_NO, ITEM_CODE, AMOUNT, ITEM_ID, INVOICE_DT) values ('105580192', '263156', '039', 230, 351, to_date('01-10-2010', 'dd-mm-yyyy'));
I want to remove the lines that are extracted from my select statement. What is the best way to achieve this?SELECT Trx_No, Item_Code, Amount, Item_Id, MAX(Invoice_Dt) FROM Bills GROUP BY Trx_No, Item_Code, Amount, Item_Id
SELECT query sets.She literally takes
delete from bills where (Trx_No,Item_Code,Amount,Item_Id,Invoice_Dt) in (select Trx_No,Item_Code,Amount,Item_Id,MAX(Invoice_Dt) FROM Bills GROUP BY Trx_No,Item_Code,Amount,Item_Id )
Concerning
Etbin
-
Display of the overall data in temporary Tables
Hello
We have three - DEV, QA, and Production environments. During the development and quality assurance, it would be useful to be able to view the data in a global temporary Table for another session. For example, if we run something in one of our applications that populates the table, it would be useful to query that data to a toad / session sqlplus for debugging purposes.
Others that the conversion of the TWG for a regular table in DEV and QA, is possible to access these data?
See you soon
SimonNo, it is not possible from now... :)
The data in a global temporary table is private, such as the data inserted by a session is accessible only by this session.Soon :)
Renjith Malet -
Fill table from excel or another source
What is the best way to populate a table from an existing Word or Excel file? I'm looking at a long list with name, address, telephone, Web site fields and as to avoid drag / drop or entering the hand. The file should be saved as a comma or tab separated ascii? Can someone point me in the right direction?
Thank you
JoeYes, export to CSV and then import using Insert--> Table--> tabular data.
Mylenium
Maybe you are looking for
-
Unable to find find the Canvio link App in the app store for Google
I had to update my android phone, but can't find the Canvio link App on the app store for Google. If it has changed?
-
The attempt to burn disc failed. Burning failed because of a medium write error.
Created playlist, click the File command: "Burn playlist to CD." Burn insiders, but after two pieces had been registered, eject disk automatically with the message: "the attempt to burn disc failed. Burning failed because of a medium write error. "B
-
HP Envy 15-J111TX: recovery media
I formatted my envy 15 times and 3 times ordered recovery media, each time when the formatting is to get during A Message comes that The Recovery Media failed, totally * beep * ed Up, please someone help me to get this thing sorted. On "[personal inf
-
Why my printer always do something called prepares to halfway through my impression? It should not prepare when it is turned on the first thing in the morning?
-
Difficulties to download an application form (in Word).
Hello. I tried to simply download an application form for a teaching position off the coast of a school Web site. Initially, the message I got was 'cannot start the converter mswrd632. I went online and then followed the instructions to remove the in