Problem sorting data in a file?
I have a problem sorting this file alphabetically by second name. Basically, my method sorts each column alphabetically but i would like to sort the file according to the second name. I really really need help. Thanks
File:
Moe Carl
Saul Sergio
Rocky Louis
Ike Ziken
This is how my method sorts the file:
Ike Carl
Moe Louis
Rocky Sergio
Saul ziken
Instead
Moe Carl
Rocky Louis
Saul Sergio
Ike Ziken
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.util.*;
class thedata implements Comparable
private String firstname;
private String secondname;
public void setFirstname(String firstname)
this.firstname = firstname;
public String getFirstname()
return firstname;
public void setSecondname(String secondname)
this.secondname = secondname;
public String getSecondname()
return secondname;
public int compareTo(Object Student) throws ClassCastException
if (!(Student instanceof ShowData))
throw new ClassCastException("Error");
String sn = ((ShowData) Student).getSecondname();
return this.secondname.compareTo(sn);
public class sort {
public static void main(String[] args) {
sortmethod();
public static void sortmethod(){
int j = 0;
thedata data[] = new thedata[4];
try
FileInputStream fstream = new FileInputStream("datafile.txt");
DataInputStream in = new DataInputStream(fstream);
BufferedReader br = new BufferedReader(new InputStreamReader(in));
String line;
String[] firstname = new String[4];
String[] secondname = new String[4];
ArrayList<String> list = new ArrayList<String>();
while ((line = br.readLine()) != null)
list.add(line);
Iterator<String> itr = list.iterator();
int k = 0;
for (itr = list.iterator(); itr.hasNext();)
String str = itr.next().toString();
String[] splitSt = str.split("\t");
for (int i = 0; i < splitSt.length; i++)
firstname[k] = splitSt[0];
secondname[k] = splitSt[1];
k++;
arraysort(firstname);
arraysort(secondname);
for(j = 0;j < 4;j++)
data[j] = new thedata();
data[j].setFirstname(firstname[j]);
data[j].setSecondname(secondname[j]);
for (int i = 0; i < 4; i++)
thedata show = data;
String firstname1 = show.getFirstname();
String secondname1 = show.getSecondname();
System.out.println(firstname1 + "\t\t" + secondname1);
catch (Exception e)
private static void arraysort(String[] array)
for(int i=0; i<array.length; i++)
for(int j=0; j<array.length-1-i; j++)
if(array[j].compareTo(array[j+1])>0)
String temp1 ="";
temp1= array[j];
array[j] = array[j+1];
array[j+1] = temp1;
Edited by: 999363 on Apr 11, 2013 3:41 AM
You're not sorting your objects, you're only sorting the firstname and secondname arrays separately, so they get scrambled. Sort the array of `thedata` objects.
BTW this:
public int compareTo(Object Student) throws ClassCastException
if (!(Student instanceof ShowData))
throw new ClassCastException("Error");
String sn = ((ShowData) Student).getSecondname();
}contains a complete waste of time. You should just remove 'throws ClassCastException' and the first two lines of the method. The test and throw happens anyway at the cast. If Student isn't an instance of ShowData the cast will fail with the same exception (and a much better error message).
Similar Messages
-
Problem converting data in XML file to internal table data
Hi all,
I have a requirement. I need to convert an XML file to internal table data and based on that data do Goods Receipt in SAP.
With the help of this blog /people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
I am able to convert the XML file to data in SAP. But this blog will display the output on screen as ELELEMNT = nodename VALUE= value of that node.
But I donu2019t want in that way, I want to store all the data in XML file in an internal table so that I can make use of those values and do Goods Recipt in SAP.
Can some one suggest how should I read the data in an internal table.
Here is my code..what changes should I make?
*& Report z_xit_xml_check
REPORT z_xit_xml_check.
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
Validation of XML file: Only DTD included in xml document is supported
PARAMETERS: pa_val TYPE char1 AS CHECKBOX.
START-OF-SELECTION.
Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table = l_xml_table
size = l_xml_table_size ).
Creating a document
l_document = l_ixml->create_document( ).
Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
WRITE: /.
WRITE: /' DOM-TREE'.
WRITE: /.
IF node IS INITIAL. EXIT. ENDIF.
create a node iterator
iterator = node->create_iterator( ).
get current node
node = iterator->get_next( ).
loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
IF NOT nodemap IS INITIAL.
attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
WRITE: / 'ATTRIBUTE:'.
WRITE: AT indent name COLOR COL_HEADING INVERSE, '=',
value COLOR COL_TOTAL INVERSE.
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
text node
value = node->get_value( ).
WRITE: / 'VALUE :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
Any help would be highly apperciated.
regards,
Jessica SamPavel Vera,
With your example i tries doing the following .....
I tried to convert the data of XML file to internal table data. I am collecting the data in internal table to do goos recipt with that data.
Please find my XML file, ABAP pgm and XSLT pgm . I donu2019t know what I am missing I am not getting any output. I donu2019t know what is wrong please help me with this
Below is my XML file, My code and XSLT Program. In the below XML file I need to collect Vendor Number, Order Number, and Date tags which occur only once for one XML file.
I also need to collect the following tags from <Shipmentdetail>
<Shipmentdetail> has following child nodes and I need to collect them
TrackingNumber
Freight
Weight
ShipmentDate
ShipmentMethod
Need to collect to collect the following tags from <ProductInformation>
<ProductInformation> has following child nodes and I need to collect them
LineNumber
SKUNumber
OrderedQuantity
ShippedQuantity
UOM
The <Shipmentdetail> and <ProductInformation> are child nodes of <OrderShipment>
The <Shipmentdetail> occurs only ones but the <ProductInformation> can occur once or many times and will be dynamic and differs depening on the input file.
My XML file is as follows
<?xml version="1.0" encoding="iso-8859-1" ?>
- <ShipmentHeader>
<AccountID />
- <OrderShipment>
<VendorNumber>1000</VendorNumber>
<OrderNumber>P00009238</OrderNumber>
<OrderType>Stock</OrderType>
<Company />
<Division />
<Department />
<Date>20061120</Date>
<CartonCount>2</CartonCount>
<ShipAllProducts>No</ShipAllProducts>
- <ShipmentDetail>
<TrackingNumber>1ZR3W891PG47477811</TrackingNumber>
<Freight>000000010000</Freight>
<ShipmentDate>20061120</ShipmentDate>
<ShipmentMethod>UPS1PS</ShipmentMethod>
</ShipmentDetail>
- <ProductInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000001000000</OrderedQuantity>
<ShippedQuantity>00000001000000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <ProductInformation>
<LineNumber>000000002</LineNumber>
<SKUNumber>938EN</SKUNumber>
<AdvSKUNumber>001 7294</AdvSKUNumber>
<SKUID />
<OrderedQuantity>00000000450000</OrderedQuantity>
<ShippedQuantity>00000000450000</ShippedQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</ProductInformation>
- <CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
<CaseInformation>
<LineNumber>000000001</LineNumber>
<SKUNumber>110FR</SKUNumber>
<AdvSKUNumber>003 4518</AdvSKUNumber>
<SKUID />
<SSCCNumber>00000001668000002487</SSCCNumber>
<CaseQuantity>00000001000000</CaseQuantity>
<UOM>EA</UOM>
<Factor>1</Factor>
</CaseInformation>
- </OrderShipment>
</ShipmentHeader>
My Program
TYPE-POOLS abap.
CONSTANTS gs_file TYPE string VALUE 'C:\temp\test.xml'.
* This is the structure for the data from the XML file
TYPES: BEGIN OF ts_shipment,
VendorNumber(10) TYPE n,
OrderNumber(20) TYPE n,
OrderType(8) TYPE c,
Date(8) TYPE c,
END OF ts_shipment.
TYPES: BEGIN OF ts_shipmentdetail,
TrackingNumber(30) TYPE n,
Freight(12) TYPE n,
Weight(14) TYPE n,
ShipmentDate(8) TYPE c,
ShipmentMethod(8) TYPE c,
END OF ts_shipmentdetail.
TYPES: BEGIN OF ts_productinformation,
LineNumber(9) TYPE n,
SKUNumber(20) TYPE c,
OrderedQuantity(14) TYPE n,
ShippedQuantity(14) TYPE n,
UOM(4) TYPE c,
END OF ts_productinformation.
* Table for the XML content
DATA: gt_itab TYPE STANDARD TABLE OF char2048.
* Table and work ares for the data from the XML file
DATA: gt_shipment TYPE STANDARD TABLE OF ts_shipment,
gs_shipment TYPE ts_shipment.
DATA: gt_shipmentdetail TYPE STANDARD TABLE OF ts_shipmentdetail,
gs_shipmentdetail TYPE ts_shipmentdetail.
DATA: gt_productinformation TYPE STANDARD TABLE OF ts_productinformation,
gs_productinformation TYPE ts_productinformation.
* Result table that contains references
* of the internal tables to be filled
DATA: gt_result_xml TYPE abap_trans_resbind_tab,
gs_result_xml TYPE abap_trans_resbind.
* For error handling
DATA: gs_rif_ex TYPE REF TO cx_root,
gs_var_text TYPE string.
* Get the XML file from your client
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = gs_file
CHANGING
data_tab = gt_itab
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
not_supported_by_gui = 17
error_no_gui = 18
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPMENT".
GET REFERENCE OF gt_shipment INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPMENT'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "ISHIPDET".
GET REFERENCE OF gt_shipmentdetail INTO gs_result_xml-value.
gs_result_xml-name = 'ISHIPDET'.
APPEND gs_result_xml TO gt_result_xml.
* Fill the result table with a reference to the data table.
* Within the XSLT stylesheet, the data table can be accessed with
* "IPRODDET".
GET REFERENCE OF gt_productinformation INTO gs_result_xml-value.
gs_result_xml-name = 'IPRODDET'.
APPEND gs_result_xml TO gt_result_xml.
* Perform the XSLT stylesheet
TRY.
CALL TRANSFORMATION z_xml_to_abap3
SOURCE XML gt_itab
RESULT (gt_result_xml).
CATCH cx_root INTO gs_rif_ex.
gs_var_text = gs_rif_ex->get_text( ).
MESSAGE gs_var_text TYPE 'E'.
ENDTRY.
* Writing the data from file for gt_shipment
*Collecting the Shipping Data from the XML file to internal table gt_shipment
*and writing the data to the screen
LOOP AT gt_shipment INTO gs_shipment.
WRITE: / 'VendorNumber:', gs_shipment-VendorNumber.
WRITE: / 'OrderNumber :', gs_shipment-OrderNumber.
WRITE: / 'OrderType :', gs_shipment-OrderType.
WRITE: / 'Date :', gs_shipment-Date.
WRITE : /.
ENDLOOP. "gt_shipment.
LOOP AT gt_shipmentdetail INTO gs_shipmentdetail.
WRITE: / 'TrackingNumber:', gs_shipmentdetail-TrackingNumber.
WRITE: / 'Freight :', gs_shipmentdetail-Freight.
WRITE: / 'Weight :', gs_shipmentdetail-Weight.
WRITE: / 'ShipmentDate :', gs_shipmentdetail-ShipmentDate.
* WRITE: / 'ShipmentMethod :' gs_shipmentdetail-ShipmentMethod
WRITE : /.
ENDLOOP. "gt_shipmentdetail.
LOOP AT gt_productinformation INTO gs_productinformation.
WRITE: / 'LineNumber:', gs_productinformation-LineNumber.
WRITE: / 'SKUNumber :', gs_productinformation-SKUNumber.
WRITE: / 'OrderedQuantity :', gs_productinformation-OrderedQuantity.
WRITE: / 'ShippedQuantity :', gs_productinformation-ShippedQuantity.
WRITE: / 'UOM :', gs_productinformation-UOM.
WRITE : /.
ENDLOOP. "gt_productinformation.
XSLT Program
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPMENT>
<xsl:apply-templates select="//OrderShipment"/>
</ISHIPMENT>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="OrderShipment">
<item>
<VENDORNUMBER>
<xsl:value-of select="VendorNumber"/>
</VENDORNUMBER>
<ORDERNUMBER>
<xsl:value-of select="OrderNumber"/>
</ORDERNUMBER>
<ORDERTYPE>
<xsl:value-of select="OrderType"/>
</ORDERTYPE>
<DATE>
<xsl:value-of select="Date"/>
</DATE>
</item>
</xsl:template>
<xsl:template match="/">
<asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
<asx:values>
<ISHIPDET>
<xsl:apply-templates select="//OrderShipment/ShipmentDetail"/>
</ISHIPDET>
</asx:values>
</asx:abap>
</xsl:template>
<xsl:template match="ShipmentDetail">
<item>
<TRACKINGNUMBER>
<xsl:value-of select="TrackingNumber"/>
</TRACKINGNUMBER>
<FREIGHT>
<xsl:value-of select="Freight"/>
</FREIGHT>
<SHIPMENTDATE>
<xsl:value-of select="ShipmentDate"/>
</SHIPMENTDATE>
<SHIPMENTMETHOD>
<xsl:value-of select="ShipmentMethod"/>
</SHIPMENTMETHOD>
</item>
</xsl:template>
</xsl:transform> .
Any help is highly appreciated. If anyone encountered this situation before please let me know where i am going wrong in my XSLT transformation.
Any Help will be highly apppreciated. Thanks in advance
Regards,
Jessica Sam -
Best way to sort data from a file alphabetically
If I have a file as such:
FIRST_NAME|LAST_NAME
I want to display the data in alphabetical order by last name and by first name. what is the best way to do this? I found java.util.Arrays
but i thought that it might be best if i read the data into a linked list. I want to display it on a form, so that I can press a next and previous button. Next will show the next record in alphabetical order after the previous one(B->C) and previous would go (C->B)
thanks.How about this:
Create a PersonRecord object, and have it implement Comparable.
import java.util.Comparator;
public class PersonRecord implements Comparable < PersonRecord >
public static Comparator < PersonRecord > surnameComparator ()
public int compare (PersonRecord pr1, PersonRecord pr2)
return pr1.getSurname ().compareTo (pr2.getSurname ());
public static Comparator < PersonRecord > nameComparator ()
public int compare (PersonRecord pr1, PersonRecord pr2)
return pr1.getName ().compareTo (pr2.getName ());
}See java.util.Comparator, java.lang.Comparable.
Then use Arrays.sort(List, Comparable) at your own discretion...
I've said enough; work that part out yourself.
lutha -
Problem : Inserting Data from flat file into databse
Hi,
i m reading values from sybase tabel and writing those values into a flat file . some of those values are from table columns which has custom data type. the next thing i do is, read values from file , and insert into different table with the same column definition. the problem is that the values those are inserted into table are different than actual values . i dont know what's really happening. if any body have any idea ,plz help.when values are inserted ,only some column values are not inserted properly. i am reading those values as getBytes ,storing them in file and after that inserting into database using setBytes. but the values which are in file are different than those get inserted into database.
dont know what is exact problem . is there something wrong with encoding. does anybody have any idea about this. what is basic encoding that sybase is using. -
Problem with Data load from file
Hi,
if i try to load data from an comma seperated file into oracle, i get an error that the page cannot be displayed, after the dialog where to specify the file and the separation method.
My Browser does not try long to open the page approx. 1 sec. ...
Anyone have a Idea about that ?
P.S I know my englisch is horribile, sorryA known bug. See below for a solution to set the timeout. Remember to reboot the PC for the changes take effect.
See Re: Problem with importing HTML DB applications -
Problem grouping data in xml file
Hello All,
Following is the sample xml file used as input source into my BIP stand alone report:
<ROWSET>
<SAMPLE_ROW>
<ID>1234</ID>
<CODE>A1</CODE>
<TEXT>FIRST GRADE</TEXT>
<CODE>B1</CODE>
<TEXT>SECOND GRADE</TEXT>
</SAMPLE_ROW>
<SAMPLE_ROW>
<ID>6789</ID>
<CODE>C1</CODE>
<TEXT>THIRD GRADE</TEXT>
<CODE>B1</CODE>
<TEXT>SECOND GRADE</TEXT>
</SAMPLE_ROW>
</ROWSET>
The expected output should be:
ID# 1234
Grades: A1
FIRST GRADE
B1
SECOND GRADE
ID# 6789
Grades: C1
THIRD GRADE
B1
SECOND GRADE
And the design i've created is:
<?for-each-group:SAMPLE_ROW;./ID?>
ID#<?ID?>
Grades:<?CODE?>
<?TEXT?>
<?end for-each-group?>
I could only display partial result but not able to achieve my desired output. Please guide.
Thanks.Thanks Jorge,
This structure can be arranged by my third party and the output came out as required.
But we also have another report which would use the same xml file as one data source and a sql query as another data source. The total xml generated would look like:
<DATA>
<DT>
<CLASS>
<ID>1234</ID>
<NAME>Rich Walker</NAME>
<Dept>IT</Dept>
</CLASS>
<CLASS>
<ID>6789</ID>
<NAME>Steve Round</NAME>
<Dept>Arts</Dept>
</CLASS>
<CLASS>
<ID>1873</ID>
<NAME>Mary Joyce</NAME>
<Dept>Arts</Dept>
</CLASS>
</DT>
<Main_XML>
<ROWSET>
<SAMPLE_ROW>
<ID>1234</ID>
<CODEROW>
<CODE>A1</CODE>
<TEXT>FIRST GRADE</TEXT>
</CODEROW>
<CODEROW>
<CODE>B1</CODE>
<TEXT>SECOND GRADE</TEXT>
</CODEROW>
</SAMPLE_ROW>
<SAMPLE_ROW>
<ID>6789</ID>
<CODEROW>
<CODE>C1</CODE>
<TEXT>THIRD GRADE</TEXT>
</CODEROW>
<CODEROW>
<CODE>B1</CODE>
<TEXT>SECOND GRADE</TEXT>
</CODEROW>
</SAMPLE_ROW>
</ROWSET>
</Main_XML>
</DATA>
And the rtf template i've designed(which is not working):
<?for-each-group:CLASS;./ID?>
ID# <?ID?>
<?variable@incontext:v_id;ID?>
Name: <?NAME?>
Dept: <?Dept?>
<?for-each-group:current-group();./ID[../ID=$v_id]?>
Grades: <?/DATA/Main_XML/ROWSET/SAMPLE_ROW/CODEROW/CODE?>
<?/DATA/Main_XML/ROWSET/SAMPLE_ROW/CODEROW/TEXT?>
<?end for-each-group?>
<?end for-each-group?>
The ideal output should be:
ID# 1234
Name: Rich Walker
Dept: IT
Grades: A1
FIRST GRADE
B1
SECOND GRADE
ID# 6789
Name: Steve Round
Dept: Arts
Grades: C1
THIRD GRADE
B1
SECOND GRADE
Please assist me in getting the desired output. -
Problem Loading Data Using UTL File Package
Hi Friends..
My Database is Oracle 10gR2 and OS is WINDOWS.
I have one excel file which contains 10 fields.
My requirement is to Load data from 1 excel file into two tables..
tables are master and detail
Below are sample data and structure for it..
Excel file format
TEST.CSV
Srno Empno Empname City Challanno challandate Materialno materialname Materialqty Materialcost
1 232 raj Hyderabad 533 20/04/2010 11 abc 34 10
1 232 raj Hyderabad 533 20/04/2010 12 aa 4 110
1 231 ram Baroda 533 20/04/2010 14 abcd 33 210
Master table
empno
Challanno
challandate
Detail table
empno
materialno
materialname
materialqty
materialcost
My question is ..While reading 1st line if its empno is new then record is entered in master table for the first time and remaining records of same empno is entered in detail table.. now when empno no changes then new entry is done in master table and associated records are entered in detail table..
So in this case for empno 232 master table would have
232,533,20/4/2010
Detail table for empno 232 would now have 2 records..
232,11,abc,34,10
232,12,aa,4,110
I am using UTL_FILE package to achieve this as the file is on server...
Kindly please help me to proceed in this..
Really appreciate your help...sai121 wrote:
Its ok..if u dont wanna reply sir... but thats what i m told to do..and i have 4yrs of industry experience too...but cant argue with boss..u know that right.It's not that people don't want to reply, it's that what you're asking for is something achieved very simply in a few lines of code using External tables but is a convoluted and complex thing to do using UTL_FILE, so why would anybody want to waste their time giving you a load of code to achieve what you want when they know it's the wrong approach anyway.
I've been computer programming for 28 years (jeez has it really been that long :D ), so I wouldn't be telling you that you're doing it the wrong way without knowing that there are better ways to do it and you're asking for the wrong way. Speak with your boss, tell him that you've been recommended to use External Tables instead because they're the right way to read such data and UTL_FILE is not the right approach. -
Problem reading data from a file
this is inside a servlet.
Re: servlet question
Author: gramberto
In Reply To: servlet question Oct 1, 2004 10:24 AM
Reply 6 of 6
I'm getting the following errors:
java.util.NoSuchElementException at java.util.StringTokenizer.nextToken(StringTokenizer.java:259) at myClass.readFile(myClass.java:387) at myClass.doPost(myClass.java:421)I am reading a file of the form:
Blah|blah2||
'|' is the delimiter. A null would just have another |
Here is my code:
public void readFile(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException
PrintWriter out = response.getWriter();
String row;
BufferedReader infile1 = new BufferedReader(new FileReader("c:\\file1.txt"));
response.setContentType("text/html");
String FName="",MName="",LName="",Sex="",Street1="",Street2="",City="",State="",Zip="",PhoneLocalCode="",PhoneAreaCode="",PhoneLastCode="",Email="",OtherInfo="";
try {
while ((row = infile1.readLine()) != null)
StringTokenizer in_str = new StringTokenizer(row, "|");
FName = in_str.nextToken();
MName = in_str.nextToken();
LName = in_str.nextToken();
Sex = in_str.nextToken();
Street1 = in_str.nextToken();
Street2 = in_str.nextToken();
City = in_str.nextToken();
State = in_str.nextToken();
Zip = in_str.nextToken();
PhoneLocalCode = in_str.nextToken();
PhoneAreaCode = in_str.nextToken();
PhoneLastCode = in_str.nextToken();
Email = in_str.nextToken();
OtherInfo = in_str.nextToken();
} catch (IOException ioException) {
out.println("Error: "+ioException);
out.println(FName);
out.println(MName);Well, you are probably passing in a line that is tokinized into less than 14 tokens.
Add some debug output that prints the line that you are tokenizing.
Use hasMoreTokens and countTokens to determine if it is ok to call nextToken or if you are already out of tokens.
E.g. you could do something along these lines:
fixed token count formatprivate void tokenize(final String line)
final StringTokenizer st = new StringTokenizer( line, "|" );
if ( st.countTokens() != 14 )
throw new RuntimeException("Invalid token count: " + st.countTokens());
FName = st.nextToken();
}variable token count formatprivate void tokenize(final String line)
final StringTokenizer st = new StringTokenizer( line, "|" );
if (st.hasMoreTokens())
FName = st.nextToken();
if (st.hasMoreTokens())
MName = st.nextToken();
} -
Sort data does not match song info
I've just discovered that some of my songs have sort data from different files. Short of going though all my music song by song is there a way to clear all sort data?
Generally setting a common Album Artist will fix split albums.
For deeper problems see Grouping tracks into albums.
tt2 -
I tryed to sort my pictures with buying Apps and following suggestion from apple, but without any success. In my opinion, the real solution is for Apple to offer us a choice of the photo sort order in ITunes. My preference would be filename, perhaps with options to choose the Date Taken attribute, file timestamp or date modified filestamp.
Not a problem when using iPhoto on a Mac, which the transfer of photos is primarily based on - not manually managing photo storage as seems to be common with Windoze.
The same should be available with a supported photo management app on a PC.
http://support.apple.com/kb/HT4221 -
Efficent method to sort data from tab delimited text file
I am currently writing a program to sort through data that was acquired and display it on a graph and some other indicators. The file is a tab delimited text file with possibly 100,000s of data points. the current method that I have tried using was that if I wanted all of the data from Oct, I would parse out the month from the timestamp, compare that to the desired month, and add it to the array if it is the same. Other possible options of sorting are yearly and daily, possibly even hourly.
The method does work, however it does take some time (up to a minute on a P4 3.6 GHz with 2 gb ram), and most of the other computers are not nearly as fast or with as much memory. Is there a more efficent method to sorting the data??
I attached my sorting vi as well as a sample data file.
thanks for the advice. It is saved in LV8.0.1
Kenny
Kenny
Attachments:
data sort.zip 84 KB
oven1.txt 21 KBFirst of all, "sorting" has usually a different meaning (Sorting and numeric array ascending or descending, a string array aphabetically, etc.). Your data already seems sorted by date and time, you just want to pick a subset having certain characteristics.
The main problem that is slowing you down is your constant growing of large arrays. This causes constant memory reallocations.
Since your data is already sorted by date and time, all you need is to place your data in a sutable data structure, find the start and end point of your selection, then use "array subset" for example.
Your code also seems to have a lot of unecessary complexity. See for example your "test for sort data" (see image below).
the four cases only differ by filename --> only the file name belongs into the case and the file operation outside the inner case. Even better, just use autoindexing.
that shift register does not do anything, because it always contains the same data. Using "index array" with index wired to [i] is equivalent to an autoindexing tunnel.
You have a case structure to select which files to read, skipped files give you an empty array. Do you really need to do all these operations on an empty array. Why not place all code inside the TRUE case??
Below is an image of one possible code alternative that addresses some of these points.
Message Edited by altenbach on 10-26-2006 09:32 AM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
testForSortData.png 33 KB -
Can no longer sort RAW with JPG files together by capture date.
Suddenly I can no longer sort JPG and RAW files together by capture date. I have two Canon SLR's shooting in RAW and one Canon point an shoot shooting in JPG and want to collate the photos in LR4, which I was able to do up to now. I cannot find out what I did to make this happen or correct it in LR preferences. Any solutions?
JimB.View->Sort->Capture Time
-
I have one problem with Data Guard. My archive log files are not applied.
I have one problem with Data Guard. My archive log files are not applied. However I have received all archive log files to my physical Standby db
I have created a Physical Standby database on Oracle 10gR2 (Windows XP professional). Primary database is on another computer.
In Enterprise Manager on Primary database it looks ok. I get the following message Data Guard status Normal
But as I wrote above the archive log files are not applied
After I created the Physical Standby database, I have also done:
1. I connected to the Physical Standby database instance.
CONNECT SYS/SYS@luda AS SYSDBA
2. I started the Oracle instance at the Physical Standby database without mounting the database.
STARTUP NOMOUNT PFILE=C:\oracle\product\10.2.0\db_1\database\initluda.ora
3. I mounted the Physical Standby database:
ALTER DATABASE MOUNT STANDBY DATABASE
4. I started redo apply on Physical Standby database
alter database recover managed standby database disconnect from session
5. I switched the log files on Physical Standby database
alter system switch logfile
6. I verified the redo data was received and archived on Physical Standby database
select sequence#, first_time, next_time from v$archived_log order by sequence#
SEQUENCE# FIRST_TIME NEXT_TIME
3 2006-06-27 2006-06-27
4 2006-06-27 2006-06-27
5 2006-06-27 2006-06-27
6 2006-06-27 2006-06-27
7 2006-06-27 2006-06-27
8 2006-06-27 2006-06-27
7. I verified the archived redo log files were applied on Physical Standby database
select sequence#,applied from v$archived_log;
SEQUENCE# APP
4 NO
3 NO
5 NO
6 NO
7 NO
8 NO
8. on Physical Standby database
select * from v$archive_gap;
No rows
9. on Physical Standby database
SELECT MESSAGE FROM V$DATAGUARD_STATUS;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC4: Archival started
ARC5: Archival started
ARC6: Archival started
ARC7: Archival started
ARC8: Archival started
ARC9: Archival started
ARCa: Archival started
ARCb: Archival started
ARCc: Archival started
ARCd: Archival started
ARCe: Archival started
ARCf: Archival started
ARCg: Archival started
ARCh: Archival started
ARCi: Archival started
ARCj: Archival started
ARCk: Archival started
ARCl: Archival started
ARCm: Archival started
ARCn: Archival started
ARCo: Archival started
ARCp: Archival started
ARCq: Archival started
ARCr: Archival started
ARCs: Archival started
ARCt: Archival started
ARC0: Becoming the 'no FAL' ARCH
ARC0: Becoming the 'no SRL' ARCH
ARC1: Becoming the heartbeat ARCH
Attempt to start background Managed Standby Recovery process
MRP0: Background Managed Standby Recovery process started
Managed Standby Recovery not using Real Time Apply
MRP0: Background Media Recovery terminated with error 1110
MRP0: Background Media Recovery process shutdown
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[1]: Assigned to RFS process 2148
RFS[1]: Identified database type as 'physical standby'
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[2]: Assigned to RFS process 2384
RFS[2]: Identified database type as 'physical standby'
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[3]: Assigned to RFS process 3188
RFS[3]: Identified database type as 'physical standby'
Primary database is in MAXIMUM PERFORMANCE mode
Primary database is in MAXIMUM PERFORMANCE mode
RFS[3]: No standby redo logfiles created
Redo Shipping Client Connected as PUBLIC
-- Connected User is Valid
RFS[4]: Assigned to RFS process 3168
RFS[4]: Identified database type as 'physical standby'
RFS[4]: No standby redo logfiles created
Primary database is in MAXIMUM PERFORMANCE mode
RFS[3]: No standby redo logfiles created
10. on Physical Standby database
SELECT PROCESS, STATUS, THREAD#, SEQUENCE#, BLOCK#, BLOCKS FROM V$MANAGED_STANDBY;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 9 13664 2
RFS IDLE 0 0 0 0
10) on Primary database:
select message from v$dataguard_status;
MESSAGE
ARC0: Archival started
ARC1: Archival started
ARC2: Archival started
ARC3: Archival started
ARC4: Archival started
ARC5: Archival started
ARC6: Archival started
ARC7: Archival started
ARC8: Archival started
ARC9: Archival started
ARCa: Archival started
ARCb: Archival started
ARCc: Archival started
ARCd: Archival started
ARCe: Archival started
ARCf: Archival started
ARCg: Archival started
ARCh: Archival started
ARCi: Archival started
ARCj: Archival started
ARCk: Archival started
ARCl: Archival started
ARCm: Archival started
ARCn: Archival started
ARCo: Archival started
ARCp: Archival started
ARCq: Archival started
ARCr: Archival started
ARCs: Archival started
ARCt: Archival started
ARCm: Becoming the 'no FAL' ARCH
ARCm: Becoming the 'no SRL' ARCH
ARCd: Becoming the heartbeat ARCH
Error 1034 received logging on to the standby
Error 1034 received logging on to the standby
LGWR: Error 1034 creating archivelog file 'luda'
LNS: Failed to archive log 3 thread 1 sequence 7 (1034)
FAL[server, ARCh]: Error 1034 creating remote archivelog file 'luda'
11)on primary db
select name,sequence#,applied from v$archived_log;
NAME SEQUENCE# APP
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00003_0594204176.001 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00004_0594204176.001 4 NO
Luda 4 NO
Luda 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00005_0594204176.001 5 NO
Luda 5 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00006_0594204176.001 6 NO
Luda 6 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00007_0594204176.001 7 NO
Luda 7 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\IRINA\ARC00008_0594204176.001 8 NO
Luda 8 NO
12) on standby db
select name,sequence#,applied from v$archived_log;
NAME SEQUENCE# APP
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00004_0594204176.001 4 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00003_0594204176.001 3 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00005_0594204176.001 5 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00006_0594204176.001 6 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00007_0594204176.001 7 NO
C:\ORACLE\PRODUCT\10.2.0\ORADATA\LUDA\ARC00008_0594204176.001 8 NO
13) my init.ora files
On standby db
irina.__db_cache_size=79691776
irina.__java_pool_size=4194304
irina.__large_pool_size=4194304
irina.__shared_pool_size=75497472
irina.__streams_pool_size=0
*.audit_file_dest='C:\oracle\product\10.2.0\admin\luda\adump'
*.background_dump_dest='C:\oracle\product\10.2.0\admin\luda\bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\oracle\product\10.2.0\oradata\luda\luda.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0\admin\luda\cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='luda','irina'
*.db_name='irina'
*.db_unique_name='luda'
*.db_recovery_file_dest='C:\oracle\product\10.2.0\flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=irinaXDB)'
*.fal_client='luda'
*.fal_server='irina'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(irina,luda)'
*.log_archive_dest_1='LOCATION=C:/oracle/product/10.2.0/oradata/luda/ VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=luda'
*.log_archive_dest_2='SERVICE=irina LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=irina'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='C:/oracle/product/10.2.0/oradata/irina/','C:/oracle/product/10.2.0/oradata/luda/'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0\admin\luda\udump'
On primary db
irina.__db_cache_size=79691776
irina.__java_pool_size=4194304
irina.__large_pool_size=4194304
irina.__shared_pool_size=75497472
irina.__streams_pool_size=0
*.audit_file_dest='C:\oracle\product\10.2.0/admin/irina/adump'
*.background_dump_dest='C:\oracle\product\10.2.0/admin/irina/bdump'
*.compatible='10.2.0.1.0'
*.control_files='C:\oracle\product\10.2.0\oradata\irina\control01.ctl','C:\oracle\product\10.2.0\oradata\irina\control02.ctl','C:\oracle\product\10.2.0\oradata\irina\control03.ctl'
*.core_dump_dest='C:\oracle\product\10.2.0/admin/irina/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_file_name_convert='luda','irina'
*.db_name='irina'
*.db_recovery_file_dest='C:\oracle\product\10.2.0/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.dispatchers='(PROTOCOL=TCP) (SERVICE=irinaXDB)'
*.fal_client='irina'
*.fal_server='luda'
*.job_queue_processes=10
*.log_archive_config='DG_CONFIG=(irina,luda)'
*.log_archive_dest_1='LOCATION=C:/oracle/product/10.2.0/oradata/irina/ VALID_FOR=(ALL_LOGFILES, ALL_ROLES) DB_UNIQUE_NAME=irina'
*.log_archive_dest_2='SERVICE=luda LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES, PRIMARY_ROLE) DB_UNIQUE_NAME=luda'
*.log_archive_dest_state_1='ENABLE'
*.log_archive_dest_state_2='ENABLE'
*.log_archive_max_processes=30
*.log_file_name_convert='C:/oracle/product/10.2.0/oradata/luda/','C:/oracle/product/10.2.0/oradata/irina/'
*.open_cursors=300
*.pga_aggregate_target=16777216
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=167772160
*.standby_file_management='AUTO'
*.undo_management='AUTO'
*.undo_tablespace='UNDOTBS1'
*.user_dump_dest='C:\oracle\product\10.2.0/admin/irina/udump'
Please help me!!!!Hi,
After several tries my redo logs are applied now. I think in my case it had to do with the tnsnames.ora. At this moment I have both database in both tnsnames.ora files using the SID and not the SERVICE_NAME.
Now I want to use DGMGRL. Adding a configuration and a stand-by database is working fine, but when I try to enable the configuration DGMGRL gives no feedback and it looks like it is hanging. The log, although says that it succeeded.
In another session 'show configuration' results in the following, confirming that the enable succeeded.
DGMGRL> show configuration
Configuration
Name: avhtest
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
avhtest - Primary database
avhtestls53 - Physical standby database
Current status for "avhtest":
Warning: ORA-16610: command 'ENABLE CONFIGURATION' in progress
It there anybody that experienced the same problem and/or knows the solution to this?
With kind regards,
Martin Schaap -
How to avoid the split problem when uploading the data from csv file
Dear Friends,
I have to upload data from the .csv file to my custom table , i have found a problem when uploading the data .
i am using the code as below , please suggest me what i have to do in this regard
SPLIT wa_raw_csv AT ',' INTO
wa_empdata_csv-status
wa_empdata_csv-userid
wa_empdata_csv-username
wa_empdata_csv-Title
wa_empdata_csv-department.
APPEND wa_empdata_csv TO itab.
in the flat file i can see for one of the record for the field Title as
Director, Finance - NAR............there by through my code the wa_empdata_csv-Title is getting splited data as "Director, and Department field is getting Finance - NAR" , i can see that even though " Director, Finance - NAR" is one word it is getting split .
.......which is the problem iam facing.Please could any body let me know how in this case i should handle in my code that this word
"Director,Finance - NAR" wil not be split into two words.
Thanks & Records
MadhuriHi Madhuri,
Best way to avoid such problem is to use TAB delimited file instead of comma separated data. Generally TAB does not appear in data.
If you are generating the file, use tab instead of comma.
If you cannot modify the format of file and data length in file is fixed character, you will need to define the structure and then move data in fixed length structure.
Regards,
Mohaiyuddin -
Aperture Video Import Problem - from Lumix GH4: Imported clips have their dates changed to the import date. The files show up on the hard drive with import date not created date, but many of these same files are not showing up in Aperture. Sometimes the clips actually show up with the current import but take on the video information from a previously imported file.
It was suggested I move this question to IPhoto or IMovie which I did.
Well moving to a different discussion group did not provide an answer to this question either. But what I finally did was import one batch of photos and videos into IPhoto for a given day at a time. Working with these I could change the date and times in order to get them in the original sequench taken. Then I would create an album with that batch. These would all be on the same day (IMove was closed for this phase). Then I would open IMovie, generate the thumbnails for that album, and select the album I had created. This was necessary because the importing process in IPhoto was using incorrect dates for my video so it was a real struggle finding them in IMove until I developed this approach.
I believe that this whole process was so screwy because I was importing from an external hard drive not a camera. I had these photos on a PC and did not have the original cameras to use to import directly which I am fairly sure would have made this easier!
Maybe you are looking for
-
How do you get the answers to your security questions emailed to you?
I have got a new iPod and have put the data from my old one on my new one. I was going to get a app and it asked me to answer 2 security questions. How can I get the answers to these questions sent to my email?
-
JVM Crashing in ParallelGC at AIX
We use JNI_CreateJavaVM to start an JVM from C. And in this JVM we use "LocateRegistry.createRegistry(JMXPORT);" to create registry. But the JVM always crash at Solaris with JDK1.6 ( It works fine with JDK1.5). The crash happens at the process of Par
-
Hi, I have scenario, where I have imported one cube from Essable into Obiee Physical Layer. Then, changed the Outline of the Essbase Cube in the Essbase Server. That means I have added one more dimension in the Essbase Outline. My requirement is, whe
-
Please help!!! I can't start up my iTunes! Even when I start comes the following alert: THE INITIALISING OF iTunes IS MALFUNCTION. - MISTAKE #-2093 PLEASE MAKE SURE, THAT QUICKTIME IS INSTALLED CORRECTLY ON THIS COMPUTER! My answer is: Yes I think so
-
Using EXECUTE IMMEDIATE for DML
What benefit is there to use EXECUTE IMMEDIATE for an UPDATE statement like the one below. EXECUTE IMMEDIATE 'UPDATE mytable SET bonus = v_bonus(i) WHERE empid =:empid AND sal =:sal' USING v_empid(n),v_sal