Import data" utility in TOAD

Hi,
I have converted data from Microsoft Excel into Oracle table using TOAD 10.6 version "Import data" utility. It is converting data from fraction to decimal but I want data in fractions in my Oracle table. Please let me know how it can be done.
Import data utility result
Code Tol_minus tol_plus  incr1  incr2
1.01   -0.5      0.25     0.75   1.75
expected result
Code Tol_minus   tol_plus  incr1    incr2
1.01   -1/2         1/4     3/4      1 3/4Thanks
Sandy

SQL> CREATE OR REPLACE
  2    FUNCTION dec_to_frac(i_number NUMBER)
  3      RETURN VARCHAR2
  4    IS
  5      vc_whole       VARCHAR2(10);
  6      vc_dec         VARCHAR2(20);
  7      vn_numerator   NUMBER;
  8      vn_denominator NUMBER;
  9    BEGIN
10      vc_whole := to_char(FLOOR(i_number));
11      vc_dec := to_char(MOD(i_number,1));
12      vn_numerator := SUBSTR(vc_dec,2);
13      vn_denominator := RPAD('1',LENGTH(vc_dec),'0');
14      FOR i IN REVERSE 2..vn_denominator/2
15      LOOP
16        IF MOD(vn_numerator,i) = 0 AND
17           MOD(vn_denominator,i) = 0
18        THEN
19          vn_numerator := vn_numerator/i;
20          vn_denominator := vn_denominator/i;
21        END IF;
22      END LOOP;
23      RETURN vc_whole||' '||to_char(vn_numerator)||'/'||to_char(vn_denominator);
24    END dec_to_frac;
25  /
Function created
SQL> select dec_to_frac(1.75) from dual;
DEC_TO_FRAC(1.75)
1 3/4
SQL> select dec_to_frac(3.875) from dual;
DEC_TO_FRAC(3.875)
3 7/8

Similar Messages

  • In disk utility, it shows that my external hard drive is somehow unmounted and I can't access it in finder or repair it in Disk Utility. How can I get this working without losing my important data?

    In disk utility, it shows that my external hard drive is somehow unmounted and I can't access it in finder or repair it in Disk Utility. How can I get this working without losing my important data?
    Thank you!

    When you erased the disk did you select Mac OS Extended Journaled as the format option?

  • Java exception: Planning Data Form Import/Export Utility: FormDefUtil.sh

    Hi,
    We have the following in our environment
    Oracle 10gAS (10.1.3.1.0)
    Shared Services (9.3.1.0.11)
    Essbase Server (9.3.1.3.01)
    Essbase Admin Services (9.3.1.0.11)
    Provider Services (9.3.1.3.00)
    Planning (9.3.1.1.10)
    Financial Reporting + Analysis UI Services (9.3.1.2)
    I got the following error while using the Planning Data Form Import/Export Utility. Does anyone have any idea?
    hypuser@server01>$PLANNING_HOME/bin/FormDefUtil.sh import TEST.xml localhost admin password SamApp
    [May 6, 2009 6:25:11 PM]: Intializing System Caches...
    [May 6, 2009 6:25:11 PM]: Loading Application Properties...
    [May 6, 2009 6:25:11 PM]: Looking for applications for INSTANCE: []
    [May 6, 2009 6:25:13 PM]: The polling interval is set =10000
    Arbor path retrieved: /home/hypuser/Hyperion/common/EssbaseRTC/9.3.1
    [May 6, 2009 6:25:14 PM]: Setting ARBORPATH=/home/hypuser/Hyperion/common/EssbaseRTC/9.3.1
    Old PATH: /home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/AnalyticServices/bin:/home/hypuser/Hyperion/common/JRE-64/IBM/1.5.0/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/hypuser/bin:/usr/bin/X11:/sbin:.
    [May 6, 2009 6:25:14 PM]: Old PATH: /home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/common/JRE/IBM/1.5.0/bin:/home/hypuser/Hyperion/AnalyticServices/bin:/home/hypuser/Hyperion/common/JRE-64/IBM/1.5.0/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/home/hypuser/bin:/usr/bin/X11:/sbin:.
    java.lang.UnsupportedOperationException
    at com.hyperion.planning.olap.HspEssbaseEnv.addEssRTCtoPath(Native Method)
    at com.hyperion.planning.olap.HspEssbaseEnv.init(Unknown Source)
    at com.hyperion.planning.olap.HspEssbaseJniOlap.<clinit>(Unknown Source)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
    at com.hyperion.planning.HspJSImpl.createOLAP(Unknown Source)
    at com.hyperion.planning.HspJSImpl.<init>(Unknown Source)
    at com.hyperion.planning.HspJSHomeImpl.createHspJS(Unknown Source)
    at com.hyperion.planning.HspJSHomeImpl.getHspJSByApp(Unknown Source)
    at com.hyperion.planning.HyperionPlanningBean.Login(Unknown Source)
    at com.hyperion.planning.HyperionPlanningBean.Login(Unknown Source)
    at com.hyperion.planning.utils.HspFormDefUtil.main(Unknown Source)
    Setting Arbor path to: /home/hypuser/Hyperion/common/EssbaseRTC/9.3.1
    [May 6, 2009 6:25:15 PM]: MAX_DETAIL_CACHE_SIZE = 20 MB.
    [May 6, 2009 6:25:15 PM]: bytesPerSubCache = 5654 bytes
    [May 6, 2009 6:25:15 PM]: MAX_NUM_DETAIL_CACHES = 3537
    Setting HBR Mode to: 2
    Unable to find 'HBRServer.properties' in the classpath
    HBR Configuration has not been initialized. Make sure you have logged in sucessfully and there are no exceptions in the HBR log file.
    java.lang.Exception: HBR Configuration has not been initialized. Make sure you have logged in sucessfully and there are no exceptions in the HBR log file.
    HBRServer.properties:HBR.embedded_timeout=10
    HBR Configuration has not been initialized. Make sure you have logged in sucessfully and there are no exceptions in the HBR log file.
    java.lang.ExceptionInInitializerError
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:205)
    at com.hyperion.hbr.api.thin.HBR.<init>(Unknown Source)
    at com.hyperion.hbr.api.thin.HBR.<init>(Unknown Source)
    at com.hyperion.planning.db.HspFMDBImpl.initHBR(Unknown Source)
    at com.hyperion.planning.db.HspFMDBImpl.initializeDB(Unknown Source)
    at com.hyperion.planning.HspJSImpl.createDBs(Unknown Source)
    at com.hyperion.planning.HspJSImpl.<init>(Unknown Source)
    at com.hyperion.planning.HspJSHomeImpl.createHspJS(Unknown Source)
    at com.hyperion.planning.HspJSHomeImpl.getHspJSByApp(Unknown Source)
    at com.hyperion.planning.HyperionPlanningBean.Login(Unknown Source)
    at com.hyperion.planning.HyperionPlanningBean.Login(Unknown Source)
    at com.hyperion.planning.utils.HspFormDefUtil.main(Unknown Source)
    Caused by: Exception HBR Configuration has not been initialized. Make sure you have logged in sucessfully and there are no exceptions in the HBR log file.
    ClassName: java.lang.Exception
    at com.hyperion.hbr.common.ConfigurationManager.getServerConfigProps(Unknown Source)
    at com.hyperion.hbr.cache.CacheManager.<clinit>(Unknown Source)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:187)
    ... 11 more
    [May 6, 2009 6:25:15 PM]: Regeneration of Member Fields Complete
    [May 6, 2009 6:25:16 PM]: Thread main acquired connection com.hyperion.planning.olap.HspEssConnection@5f0e5f0e
    [May 6, 2009 6:25:16 PM]: Thread main releasing connection com.hyperion.planning.olap.HspEssConnection@5f0e5f0e
    [May 6, 2009 6:25:16 PM]: Thread main released connection com.hyperion.planning.olap.HspEssConnection@5f0e5f0e
    [May 6, 2009 6:25:16 PM]: Need to create an Object. pool size = 0 creatredObjs = 1
    java.lang.RuntimeException: Unable to aquire activity lease on activity 1 as the activity is currently leased by another server.
    at com.hyperion.planning.sql.actions.HspAquireActivityLeaseCustomAction.custom(Unknown Source)
    at com.hyperion.planning.sql.actions.HspAction.custom(Unknown Source)
    at com.hyperion.planning.sql.actions.HspActionSet.doActions(Unknown Source)
    at com.hyperion.planning.sql.actions.HspActionSet.doActions(Unknown Source)
    at com.hyperion.planning.HspJSImpl.aquireActivityLease(Unknown Source)
    at com.hyperion.planning.HspJSImpl.reaquireActivityLease(Unknown Source)
    at com.hyperion.planning.utils.HspTaskListAlertNotifier.reaquireTaskListActivityLease(Unknown Source)
    at com.hyperion.planning.utils.HspTaskListAlertNotifier.processTaskListAlerts(Unknown Source)
    at com.hyperion.planning.utils.HspTaskListAlertNotifier.run(Unknown Source)
    [May 6, 2009 6:25:16 PM]: Fetching roles list for user took time: Total: 42
    [May 6, 2009 6:25:16 PM]: Entering method saveUserIntoPlanning
    [May 6, 2009 6:25:16 PM]: User role is:0
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HP:0005,ou=HP,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:1,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:9,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:3,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:7,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:14,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:15,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:10,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:12,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:13,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:1,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:9,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:3,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:7,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:14,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:15,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:10,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:12,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Skipping unused HUB role: native://DN=cn=HUB:13,ou=HUB,ou=Roles,dc=css,dc=hyperion,dc=com?ROLE
    [May 6, 2009 6:25:16 PM]: Hub Roles for user is:991
    [May 6, 2009 6:25:16 PM]: Exiting method saveUserIntoPlanning
    [May 6, 2009 6:25:16 PM]: Saved the user admin to Planning
    [May 6, 2009 6:25:16 PM]: Entering method persistUserChanges()
    [May 6, 2009 6:25:16 PM]: Exiting method persistUserChanges()
    [May 6, 2009 6:25:16 PM]: Before calling getGroupsList for user from CSS
    [May 6, 2009 6:25:16 PM]: After getGroupsList call returned from CAS with groupsList [Ljava.lang.String;@705c705c
    [May 6, 2009 6:25:16 PM]: Fetching groups list for user took time: Total: 4
    [May 6, 2009 6:25:16 PM]: Entering method persistGroupChanges()
    [May 6, 2009 6:25:16 PM]: Exiting method persistGroupChanges()
    [May 6, 2009 6:25:16 PM]: User synchronization of 1 user elapsed time: 81, Users: 72, Groups: 9.
    [May 6, 2009 6:25:16 PM]: Didnt add child Forms, couldnt find parent 1
    Add/Update form under form folder - Corporate
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspObject Object Type: -1 Primary Key: 1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspPDFPrintOptions Object Type: -1 Primary Key: 1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspForm Object Type: 7 Primary Key: 1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspPDFPrintOptions Object Type: -1 Primary Key: 1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspAnnotation Object Type: 14 Primary Key: 1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspAccessControl Object Type: 15 Primary Key: 50001,1454699 ]
    [May 6, 2009 6:25:21 PM]: Propegating external event[ FROM_ID: 7a7ebc1d Class: class com.hyperion.planning.sql.HspFormDef Object Type: -1 Primary Key: 1454699 ]
    Form imported complete.
    [May 6, 2009 6:25:21 PM]: Could not get HBR connection.

    Hi,
    When I run the Formdefutil command, forms were imported successfully. But I got the following message.
    Could not get HBR connection.
    What does it mean?
    Thanks & Regards,
    Sravan Kumar.

  • Oracle data pump vs import/export utility

    Hello all,
    What is the difference between Oracle Data Pump and Import/Export utility? which on is the faster?

    Handle:      user9362044
    Status Level:      Newbie
    Registered:      Jan 26, 2011
    Total Posts:      31
    Total Questions:      11 (7 unresolved)
    so many questions & so few answers.
    What is the difference between Oracle Data Pump and Import/Export utility?unwilling or incapable to Read The Fine Manual yourself?
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/toc.htm

  • How to update link and import data of relocated incx file into inca file?

    Subject : <br />how to update link and import data of relocated incx file into inca file.?<br />The incx file was originally part of the inca file and it has been relocated.<br />-------------------<br /><br />Hello All,<br /><br />I am working on InDesignCS2 and InCopyCS2.<br />From indesign I am creating an assignment file as well as incopy files.(.inca and .incx file created through exporing).<br />Now indesign hardcodes the path of the incx files in inca file.So if I put the incx files in different folder then after opening the inca file in InCopy , I am getting the alert stating that " The document doesn't consists of any incopy story" and all the linked story will flag a red question mark icon.<br />So I tried to recreate and update the links.<br />Below is my code for that<br /><br />//code start*****************************<br />//creating kDataLinkHelperBoss<br />InterfacePtr<IDataLinkHelper> dataLinkHelper(static_cast<IDataLinkHelper*><br />(CreateObject2<IDataLinkHelper>(kDataLinkHelperBoss)));<br /><br />/**<br />The newFileToBeLinkedPath is the path of the incx file which is relocated.<br />And it was previously part of the inca file.<br />eg. earlier it was c:\\test.incx now it is d:\\test.incx<br />*/<br />IDFile newIDFileToBeLinked(newFileToBeLinkedPath);<br /><br />//create the datelink<br />IDataLink * dlk = dataLinkHelper->CreateDataLink(newIDFileToBeLinked);<br /><br />NameInfo name;<br />PMString type;<br />uint32 fileType;<br /><br />dlk->GetNameInfo(&name,&type,&fileType);<br /><br />//relink the story     <br />InterfacePtr<ICommand> relinkCmd(CmdUtils::CreateCommand(kRestoreLinkCmdBoss)); <br /><br />InterfacePtr<IRestoreLinkCmdData> relinkCmdData(relinkCmd, IID_IRESTORELINKCMDDATA);<br /><br />relinkCmdData->Set(database, dataLinkUID, &name, &type, fileType, IDataLink::kLinkNormal); <br /><br />ErrorCode err = CmdUtils::ProcessCommand(relinkCmd); <br /><br />//Update the link now                         <br />InterfacePtr<IUpdateLink> updateLink(dataLinkHelper, UseDefaultIID()); <br />UID newLinkUID; <br />err = updateLink->DoUpdateLink(dl, &newLinkUID, kFullUI); <br />//code end*********************<br /><br />I am able to create the proper link.But the data which is there in the incx file is not getting imported in the linked story.But if I modify the newlinked story from the inca file,the incx file will be getting update.(all its previous content will be deleted.)<br />I tried using <br />Utils<IInCopyWorkflow>()->ImportStory()<br /> ,But its import the incx file in xml format.<br /><br />What is the solution of this then?<br />Kindly help me as I am terribly stuck since last few days.<br /><br />Thanks and Regards,<br />Yopangjo

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • How to import data from a text file into a table

    Hello,
    I need help with importing data from a .csv file with comma delimiter into a table.
    I've been struggling to figure out how to use the "Import from Files" wizard in Oracle 10g web-base Enterprise Manager.
    I have not been able to find a simple instruction on how to use the Wizard.
    I have looked at the Oracle Database Utilities - Overview of Oracle Data Pump and the Help on the "Import: Files" page.
    Neither one gave me enough instruction to be able to do the import successfully.
    Using the "Import from file" wizard, I created a Directory Object using the Create Directory Object button. I Copied the file from which i needed to import the data into the Operating System Directory i had defined in the Create Directory Object page. I chose "Entire files" for the Import type.
    Step 1 of 4 is the "Import:Re-Mapping" page, I have no idea what i need to do on this page. All i know i am not tying to import data that was in one schema into a different schema and I am not importing data that was in one tablespace into a different tablespace and i am not R-Mapping datafiles either. I am importing data from a csv file.
    For step 2 of 4, "Import:Options" page, I selected the same directory object i had created.
    For step 3 of 4, I entered a job name and a description and selected Start Immediately option.
    What i noticed going through the wizard, the wizard never asked into which table do i want to import the data.
    I submitted the job and I got ORA-31619 invalid dump file error.
    I was sure that the wizard was going to fail when it never asked me into which table do i want to import the data.
    I tried to use the "imp" utility in command-line window.
    After I entered (imp), i was prompted for the username and the password and then the buffer size as soon as i entered the min buffer size I got the following error and the import was terminated:
    C:\>imp
    Import: Release 10.1.0.2.0 - Production on Fri Jul 9 12:56:11 2004
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Username: user1
    Password:
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Import file: EXPDAT.DMP > c:\securParms\securParms.csv
    Enter insert buffer size (minimum is 8192) 30720> 8192
    IMP-00037: Character set marker unknown
    IMP-00000: Import terminated unsuccessfully
    Please show me the easiest way to import a text file into a table. How complex could it be to do a simple import into a table using a text file?
    We are testing our application against both an Oracle database and a MSSQLServer 2000 database.
    I was able to import the data into a table in MSSQLServer database and I can say that anybody with no experience could easily do an export/import in MSSQLServer 2000.
    I appreciate if someone could show me how to the import from a file into a table!
    Thanks,
    Mitra

    >
    I can say that anybody with
    no experience could easily do an export/import in
    MSSQLServer 2000.
    Anybody with no experience should not mess up my Oracle Databases !

  • Import data from excel/csv file in web dynpro

    Hi All,
    I need to populate a WD table by first importing a excel/CSV file thru web dynpro screen and then reading thru the file.Am using FileUpload element from NW04s.
    How can I read/import data from excel / csv file in web dynpro table context?
    Any help is appreciated.
    Thanks a lot
    Aakash

    Hi,
    Here are the basic steps needed to read data from excel spreadsheet using the Java Excel API(jExcel API).
    jExcel API can read a spreadsheet from a file stored on the local file system or from some input stream, ideally the following should be the steps while reading:
    Create a workbook from a file on the local file system, as illustrated in the following code fragment:
              import java.io.File;
              import java.util.Date;
              import jxl.*;
             Workbook workbook = Workbook.getWorkbook(new File("test.xls"));
    On getting access to the worksheet, once can use the following code piece to access  individual sheets. These are zero indexed - the first sheet being 0, the  second sheet being 1, and so on. (You can also use the API to retrieve a sheet by name).
              Sheet sheet = workbook.getSheet(0);
    After getting the sheet, you can retrieve the cell's contents as a string by using the convenience method getContents(). In the example code below, A1 is a text cell, B2 is numerical value and C2 is a date. The contents of these cells may be accessed as follows
    Cell a1 = sheet.getCell(0,0);
    Cell b2 = sheet.getCell(1,1);
    Cell c2 = sheet.getCell(2,1);
    String a1 = a1.getContents();
    String b2 = b2.getContents();
    String c2 = c2.getContents();
    // perform operations on strings
    However in case we need to access the cell's contents as the exact data type ie. as a numerical value or as a date, then the retrieved Cell must be cast to the correct type and the appropriate methods called. The code piece given below illustrates how JExcelApi may be used to retrieve a genuine java double and java.util.Date object from an Excel spreadsheet. For completeness the label is also cast to it's correct type. The code snippet also illustrates how to verify that cell is of the expected type - this can be useful when performing validations on the spreadsheet for presence of correct datatypes in the spreadsheet.
      String a1 = null;
      Double b2 = 0;
      Date c2 = null;
                        Cell a1 = sheet.getCell(0,0);
                        Cell b2 = sheet.getCell(1,1);
                        Cell c2 = sheet.getCell(2,1);
                        if (a1.getType() == CellType.LABEL)
                           LabelCell lc = (LabelCell) a1;
                           stringa1 = lc.getString();
                         if (b2.getType() == CellType.NUMBER)
                           NumberCell nc = (NumberCell) b2;
                           numberb2 = nc.getValue();
                          if (c2.getType() == CellType.DATE)
                            DateCell dc = (DateCell) c2;
                            datec2 = dc.getDate();
                           // operate on dates and doubles
    It is recommended to, use the close()  method (as in the code piece below)   when you are done with processing all the cells.This frees up any allocated memory used when reading spreadsheets and is particularly important when reading large spreadsheets.              
              // Finished - close the workbook and free up memory
              workbook.close();
    The API class files are availble in the 'jxl.jar', which is available for download.
    Regards
    Raghu

  • How to export/import data of hyperion performance scorecard?

    I have a Hyperion Performance Scorecard Environment which save data in Oracle database. Now I am trying to setup another scorecard environment which has exact the same set of data and use MS SQL Server as database. What is the best way to dump data from Oracle one to SQL Server one? I tried to use HPS Import/Export Utility to export data from Oracle scorecard environment to .CSV file and then import .CSV file into SQL Server Scorecard environment. The exporting process went well despite of some warning message. However, I keep getting trouble with importing. There are a lot of issues such as inconsistency date format, data dependencies, missing comma in .csv file, etc. Could anyone suggest me some easier way to do this data dumping thing? All what I am trying to achieve is a clone of my HPS environment. Thanks a lot.

    Hi Yang,
    i had your Query regarding Hyperion Performance ScoreCard. I feel that you may have some idea regarding this tool, so i was asking you. I need Some information Regarding that tool, implementations, Current& Future market, and any prerequisites to work on that tool. Also if you have any idea on Hyperion Essbase & planning plz let me know the implementations of this HPScore card when compared to them.I would be thankfull to you if you let me know what ever you know about that.
    Regards

  • I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting, but the password from the old computer in when waking the computer from sleep.

    I have a password problem. After importing data and settings from one MacBook Pro to a new one, I have to put my iCloud password in when re-starting the new computer, but the password from the old computer in when waking the computer from sleep. I want to use my iCloud password on both computers consistently. How can I fix this?

    The only other place to change a password for the computer login is in Users & Groups preferences. But I don't really know enough here to fix your problem. You can try fixing the keychain:
    iCloud- Frequently asked questions about iCloud Keychain
    Tutorial: Resolving Keychain Issues
    If you can't access your keychain, or forget your password If you can't get into your keychain file because you've forgotten your password or the keychain file appears to be corrupt, there are a couple of options.
    First, if you've forgotten your password, you can use the "Keychain First Aid" utility to make the keychain password the same as the login password. This can be accomplished via the following process:
      1. Open Keychain Access (located in Applications/Utilities)
      2. Go to the "Keychain Access" menu and select "Preferences"
      3. Click the "First Aid" tab
      4. Make sure the "Synchronize login keychain password" box is checked
      5. Close the Preferences window
      6. Go to the "Keychain Access" menu and select "Keychain First Aid"
      7. Enter your username and password
      8. Click the "Repair" button
    The second option is to completely delete your keychain then recreate it. This routine is useful if your keychain appears to be corrupt or otherwise inaccessible. This can be accomplished as follows:
      1. Launch Keychain Access (located in Applications/Utilities)
      2. Click "Show Keychains" in the lower-left corner of the window.
      3. Select the problematic keychain from the left-hand pane.
      4. Navigate to the "File" menu and select "Delete Keychain '(name of keychain)'"
      5. Check all options for deletion and press "OK"
      6. Create a new keychain by going to the "File" menu, then "New" and selecting
          "New Keychain"
      7. You can now make this keychain your default if you desire by selecting it, then
          going to the "File" menu and selecting "Make '(name of keychain)' Default"
    Login as root and perform repair In some cases, problems with keychains can only be resolved when logged in as the root user.
    First, you want to enable the root user:
      1. OS X Mountain Lion: Enable and disable the root user
      2. OS X Lion: Enable and disable the root user
      3. Mac OS X 10.6: Enabling the root user
      4. Enabling and using the "root" user in Mac OS X
    After enabling the root user, and logging in under this account, again open Keychain Access. First attempt repairs using Keychain First Aid, and failing that, delete then recreate the keychain as described above while logged in as root.
    Persistently asked for stored passwords If you are persistently asked for passwords in various applications that you have specified should be remembered in a keychain, your "login" keychain may not be active for one reason or another.
    Navigate to ~/Library/Keychains/ (this is the Library folder inside your user's home folder). Find the file named "login.keychain" and double-click it.
    Failing that, select the "login" keychain within the Keychain Access application and make sure it is the default keychain by going to the "File" menu and selecting "Make 'Login' Default"
    Turn off Keychain synchronization in applications having problems If specific applications are experiencing issues when accessing password-protected material, the Keychain may be to blame.
    The above comes from an article published on MacFixit.com.

  • Is it possible to import data into an existing table?

    Hi.. everyone.
    Is it possible to import data into an existing table
    by using import utility?
    The exported table and the existing table have the same name
    and table schema.
    I want to append "new data(exported from oracle8.0.5)" to
    "an existing partitioned-table" by using "oracle 9i import utility".
    Thanks in advance.
    Have a nice day.
    Ho.

    SQL> select index_name
    2 from user_indexes
    3 where table_name = 'IMPORTPK';
    INDEX_NAME
    SYS_C007610
    SQL> create view importpk_view as select * from importpk;
    View created.
    SQL> disconn
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    C:\>exp userid=oracle/oracle tables=importpk
    Export: Release 10.1.0.2.0 - Production on Tue Sep 5 08:30:50 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table IMPORTPK 10 rows exported
    Export terminated successfully without warnings.
    C:\>imp userid=oracle/oracle tables=importpk ignore=y
    Import: Release 10.1.0.2.0 - Production on Tue Sep 5 08:31:12 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing ORACLE's objects into ORACLE
    . . importing table "IMPORTPK"
    IMP-00019: row rejected due to ORACLE error 1
    IMP-00003: ORACLE error 1 encountered
    ORA-00001: unique constraint (ORACLE.SYS_C007610) violated
    Column 1 1
    Import terminated successfully with warnings.
    C:\>sqlplus/nolog
    SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 5 08:33:20 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    1.No
    Note : if table content primary key and index.
    SQL> conn oracle/oracle
    Connected.
    SQL> create table withoutcons ( no number);
    Table created.
    SQL> insert into withoutcons select * from importpk;
    10 rows created.
    SQL> create view withoutcons_view as select * from withoutcons;
    View created.
    SQL> disconn
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    C:\>exp userid=oracle/oracle tables=withoutcons
    Export: Release 10.1.0.2.0 - Production on Tue Sep 5 08:36:05 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table WITHOUTCONS 10 rows exported
    Export terminated successfully without warnings.
    C:\>imp userid=oracle/oracle tables=withoutcons ignore=y
    Import: Release 10.1.0.2.0 - Production on Tue Sep 5 08:37:17 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing ORACLE's objects into ORACLE
    . . importing table "WITHOUTCONS" 10 rows imported
    Import terminated successfully without warnings.
    2. Yes
    If table content no unique constraints
    Message was edited by:
    user526020

  • Importing Data from Excel (XML) into Adobe - Multiple Lines

    I have a form that I have created in Adobe Life Cycle Designer 4.
    All the data I need is now stored in an XML file that was created in Excel.
    When I attempt to import the data into Adobe Acrobat using the "Import Data" feature, it only imports the first line of data, but we have over 500 records that we would like to generate into 500 filled forms
    Each line of data represents 1 entire form and all the fields.  The importation works just fine on the first line of data and the fields get populated properly, but I am trying to find a way of importing each line so that each line
    generates a "filled out form".
    In essence, there would be 500 PDF's generated, each one with unique data based on the data in each line of the XML file.
    Any help here would be greatly appreciated
    Thank you in advance!
    Regards,
    Nizar

    There are two options
    1. try to use SQL*Loader utility.
    2. Make JDBC ODBC connection to Excel file and use JDBC queries to read and store data to database. The name of first row columns are used as table columns. The java code example for this is posted below,
              Connection con= null;
              try
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con= DriverManager.getConnection("jdbc:odbc:GC", "", "");
                   Statement stmt= con.createStatement();
                   ResultSet rs= stmt.executeQuery("select username, password from userlogin");
                   while (rs.next())
                        String lname = rs.getString(1);
                        String fname = rs.getString(2);
                        System.out.println(fname + " " + lname);
                   rs.close();
                   System.out.println(con.isClosed());
                   stmt.close();
              finally
                   if (con != null)
                        con.close();
              }

  • Import data from a ooo.base to Derby

    Hi,
    I need to import data from a ooo.base to Derby.
    I am not an expert in this kind of work, but:
    - I prepared the data in a spreadsheet, exporting them from the ooo.base.
    - And I read in the documentation that Derby allow to import data with the statement:
    SYSCS_UTIL.SYSCS_IMPORT_DATA(.....);Now I am trying to do things in this way, but I am not able to write correctly the statement above.
    I tried it in some different way and always :
        exmples:
    CALL SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'STAFF', null, '1,3,4', 'data.del', null, null, null,0);
    CALL(" SYSCS_UTIL.SYSCS_IMPORT_DATA(NULL, 'STAFF', null, '1,3,4', 'data.del', null, null, null,0)");but the NetBeans IDE evidence shows that this statement is with error of syntax_.
    I spent much time to understand how to write this SQL procedure, so I would like some help to be able to do it.
    Thank you in advance
    Regards
    Angelo Moreschini

    Hi jshell,
    it is nice to hear from you again.
    After I read your suggestion I looked better on the manuals of Derby.
    Derby has such tools that you supposed they have; they are named ij, but they work from the command line and they are not easy to use.
    The procedure to import/export data of Derby can be used from the ij utility or inside a Java program.
    The procedure to import and export data of Derby are in the file derbytools.jar, and this file have to be in the classpath if you want to use them.
    Putting derbytools.jar in the classpath I could execute the code that I post down (to benefit of others that can be interested) without errors:
                PreparedStatement ps = connection.prepareStatement("CALL SYSCS_UTIL.SYSCS_EXPORT_TABLE (?,?,?,?,?,?)");
                ps.setString(1, null);
                ps.setString(2, "STAFF");
                ps.setString(3, "staff.dat");
                ps.setString(4, "%");
                ps.setString(5, null);
                ps.setString(6, null);
                ps.execute();Thank you for the advice
    regards
    Angelo.

  • Importing Date Class

    Hi,
              I am importing java.util.* and java.sql.timestamp (not java.sql.*)
              and defining a variable of type Date say :-
              Date date;
              It complains saying: Ambiguous class definition: java.util.Date vs
              java.sql.Date ;
              the interesting thing is it works well on JDK1.2.2 on WinNT while it
              gives the above problem on Solaris.
              Any ideas would be appreciated,
              Thanks!
              Vikas
              

    That I already did and that would have surely worked but that's not the
              solution i was looking for,
              coz there's a way you import the java classes and if it works on NT, why
              shudn't it work on Solaris?
              What do u say?
              Rich Cariens wrote:
              > change
              >
              > Date date;
              >
              > to:
              >
              > java.util.Date date;
              >
              > and see if that works...
              >
              > Vikas Goel wrote:
              >
              > > Hi,
              > > I am importing java.util.* and java.sql.timestamp (not java.sql.*)
              > > and defining a variable of type Date say :-
              > > Date date;
              > >
              > > It complains saying: Ambiguous class definition: java.util.Date vs
              > > java.sql.Date ;
              > > the interesting thing is it works well on JDK1.2.2 on WinNT while it
              > > gives the above problem on Solaris.
              > >
              > > Any ideas would be appreciated,
              > > Thanks!
              > > Vikas
              >
              > --
              > Rich
              

  • Import data in 9i

    Dear Experts
    I want to import data in 9i database but i dont want archives(redo) generation during importing data.
    how can i do this?
    regards
    saima

    Hi,
    Not possible, if you are using imp utility to import the dump.
    Regards
    Anurag Tibrewal.

  • Importing data into tables with grant access (sql developer 3.2)

    Hello,
    I want to import data into a table PAY_BALANCE_BATCH_LINES which is an interface table. I'm logged in to a schema (APPS) and this table belongs to the HR schema. However, if you look at the grants, the APPS schema has all access to this particular table. In TOAD, this used to work great.
    But in sqldeveloper, when I filter the tables dropdown, I am not able to find this table. Since this is my primary way of uploading data I'm not sure how else I can get access to upload data into this table. I don't know the password for the HR schema by the way.
    Is there a way out?
    Many Thanks

    Scroll down the tree to the 'Other Users' node, expand it, and then drill down into HR > Tables. Then do your import.
    For an alternative browser, right-click on your connection in the tree and open a Schema Browser.

Maybe you are looking for