How to insert multi language data to oracle database

Hi ,
Can any one suggest the steps involved in implementing storage/retrieval of data in the language otherthan english on the database?. I am using Oracle 9i database.
I want to write sql scripts to insert data to the database.How can i insert the data in the language otherthan english i.e hindi. ensuring storage and display of data is fine at the backend.
CHARACTERSET is set AL32UTF8 and need to insert the data in the NVARCHAR2 datatype enabled column.
Any suggestions would be greatly appreciated.
Thanks and Regards,
Poornima

If you can write the text in Notepad, then enter the text and save the file with the encoding "Unicode big endian". Then, open the file in a hex editor. The first two bytes will be 0xFE and 0xFF (this is the Byte Order Mark). This code should be skipped for database storage as it is relevant to flat files only. What follows are two-byte character codes that you can put into UNISTR calls. The file with the word "Patra" will show up in the hex editor as:
FE FF 09 2a 09 24 09 4d 09 30
If you can enter the characters in your HTML browser, you can use the very useful conversion page at http://rishida.net/tools/conversion/ (this is not an official endorsement from Oracle but my personal advice). Enter the characters into the "Characters" text area and click on the corresponding [Convert] button. The "Hexadecimal code points" field will tell you the codes that you need to prefix with backslash and put into the UNISTR call.
If you are unable to enter the characters on your workstation, then you can identify each letter in the text and look it up in the Unicode character database at http://www.unicode.org/Public/UNIDATA/Index.txt or http://www.unicode.org/Public/UNIDATA/NamesList.txt. The four-digit hexadecimal codes listed there are what you are looking for. Unfortunately, such lookup will not work for Chinese Han and Japanese Kanji characters as they have no names in Unicode.
Another method is to use files in another language-specific encoding and convert them to Unicode before loading them into the AL32UTF8 database.
-- Sergiusz

Similar Messages

  • How to insert a image file into oracle database

    hi all
    can anyone guide me how to insert a image file into oracle database now
    i have created table using
    create table imagestore(image blob);
    but when inserting i totally lost don't know what to do how to write query to insert image file

    Hi I don't have time to explain really, I did have to do this a while ago though so I will post a code snippet. This is using the commons file upload framework.
    Firstly you need a multi part form data (if you are using a web page). If you are not using a web page ignore this bit.
    out.println("<form name=\"imgFrm\" method=\"post\" enctype=\"multipart/form-data\" action=\"FileUploadServlet?thisPageAction=reloaded\" onSubmit=\"return submitForm();\"><input type=\"FILE\" name=\"imgSource\" size='60' class='smalltext' onKeyPress='return stopUserInput();' onKeyUp='stopUserInput();' onKeyDown='stopUserInput();' onMouseDown='noMouseDown(event);'>");
    out.println("   <input type='submit' name='submit' value='Submit' class='smalltext'>");
    out.println("</form>"); Import this once you have the jar file:
    import org.apache.commons.fileupload.*;Now a method I wrote to upload the file. I am not saying that this is correct, or its the best way to do this. I am just saying it works for me.
    private boolean uploadFile(HttpServletRequest request, HttpSession session) throws Exception {
            boolean result = true;
            String fileName = null;
            byte fileData[] = null;
            String fileUploadError = null;
            String imageType = "";
            String error = "";
            DiskFileUpload fb = new DiskFileUpload();
            List fileItems = fb.parseRequest(request);
            Iterator it = fileItems.iterator();
            while(it.hasNext()){
                FileItem fileItem = (FileItem)it.next();
                if (!fileItem.isFormField()) {
                    fileName = fileItem.getName();
                    fileData = fileItem.get();
                    // Get the imageType from the filename extension
                    if (fileName != null) {
                        int dotPos = fileName.indexOf('.');
                        if (dotPos >= 0 && dotPos != fileName.length()-1) {
                            imageType = fileName.substring(dotPos+1).toLowerCase();
                            if (imageType.equals("jpg")) {
                                imageType = "jpeg";
            String filePath = request.getParameter("FILE_PATH");
            session.setAttribute("filePath", filePath);
            session.setAttribute("fileData", fileData);
            session.setAttribute("fileName", fileName);
            session.setAttribute("imageType", imageType);
            return result;  
         } And now finally the method to actually write the file to the database:
    private int writeImageFile(byte[] fileData, String fileName, String imageType, String mode, Integer signatureIDIn, HttpServletRequest request) throws Exception {
            //If the previous code found a file that can be uploaded then
            //save it into the database via a pstmt
            String sql = "";
            UtilDBquery udbq = getUser(request).connectToDatabase();
            Connection con = null;
            int signatureID = 0;
            PreparedStatement pstmt = null;
            try {
                udbq.setUsePreparedStatements(true);
                con = udbq.getPooledConnection();
                con.setAutoCommit(false);
                if((!mode.equals("U")) || (mode.equals("U") && signatureIDIn == 0)) {
                    sql = "SELECT SEQ_SIGNATURE_ID.nextval FROM DUAL";
                    pstmt = con.prepareStatement(sql);
                    ResultSet rs = pstmt.executeQuery();
                    while(rs.next()) {
                       signatureID = rs.getInt(1);
                    if (fileName != null && imageType != null) {
                        sql = "INSERT INTO T_SIGNATURE (SIGNATURE_ID, SIGNATURE) values (?,?)";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setInt(1, signatureID);
                        pstmt.setBinaryStream(2, is2, (int)(fileData.length));
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
                if(mode.equals("U") && signatureIDIn != 0) {
                    signatureID = signatureIDIn.intValue();
                    if (fileName != null && imageType != null) {
                        sql = "UPDATE T_SIGNATURE SET SIGNATURE = ? WHERE SIGNATURE_ID = ?";
                        InputStream is2 = new ByteArrayInputStream(fileData);
                        pstmt = con.prepareStatement(sql);
                        pstmt.setBinaryStream(1, is2, (int)(fileData.length));
                        pstmt.setInt(2, signatureID);
                        pstmt.executeUpdate();
                        pstmt.close();
                        con.commit();
                        con = null;
            } catch (Exception e) {
                con = null;
                throw new Exception(e.toString());
            return signatureID;
       }

  • How to insert an image file in Oracle database

    hi
    can you please tell me how to insert an image file into oracle database????
    suppose there is one image file in c:\pictures\rose.jpg. how to insert that file into database? theoretically i know that will be BFILE type but i dont know how to insert that.
    will be waiting for your reply........
    thanks & regards,
    Priyatosh

    Hello,
    The easiest way to load a blob is to use SQL loader.
    This example comes from the utilities guide:
    LOAD DATA
    INFILE 'sample.dat'
    INTO TABLE person_table
    FIELDS TERMINATED BY ','
    (name CHAR(20),
    1 ext_fname FILLER CHAR(40),
    2 "RESUME" LOBFILE(ext_fname) TERMINATED BY EOF)
    Datafile (sample.dat)
    Johny Quest,jqresume.txt,
    Speed Racer,'/private/sracer/srresume.txt',
    Secondary Datafile (jqresume.txt)
    Johny Quest
    500 Oracle Parkway
    Secondary Datafile (srresume.txt)
    Loading LOBs
    10-18 Oracle Database Utilities
    Speed Racer
    400 Oracle Parkway
    regards,
    Ivo

  • How to load text file data to Oracle Database table?

    By using Oracle Forms, how to load text file data to Oracle Database table?

    Metalink note 33247.1 explains how to use text_io as suggested by Robin to read the file into a Multi-Row block. However, that article was written for forms 4.5 and uses CREATE_RECORD in a loop. There was another article, 91513.1 describing the more elegant method of 'querying' the file into the block by transactional triggers. Unfortunately this more recent article has disappeared without trace and Oracle deny its existence. I know it existed as I have a printed copy in front of me, and very useful it is too.

  • How to enter URDU Language data in Oracle

    hi,
    im having great problems in entering Urdu Language data in Oracle 9i rel.2 database on win2000 ad. server having my client PCs on windows xp,, then front end of our application being in developing process,,in .net framework,,using vb.net,,now windows xp is supporting urdu and data in urdu language is entered properly from the front end application but oracle is not supporting it,, and not displaying right translated characters,,my country is Pakistan,,laguage is Urdu,,the character set of my database is we8mswin1252 and national character set is al16utf16,,
    plz help me wriggle out the situation.
    regards
    umar

    I am not completely certain what Oracle character sets support Urdu, but I can say that Windows-1252 certainly does not. You probably want to use UTF-8 as the database character set.
    Unfortunately, changing the database character set generally requires rebuilding the database. You cannot use the ALTER DATABASE command here, since UTF-8 is not a strict binary superset of Windows-1252.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • How to insert java.util.Date to Oracle by OraclePrepaidStatement

    Hi all,
    I am trying to insert the date data to oracle a lot. But all of them works wrong???
    Here's a code:
    package main;
    import oracle.jdbc.driver.*;
    import oracledb.OraCon;
    import java.text.SimpleDateFormat;
    public class inmain {
          * @param args
         public static void main(String[] args)
              OraCon conn = new OraCon();
              conn.alloc();
              String sql = "insert into test(c_Date, c_Float, c_Int, c_String) values (?,?,?,?)";
              java.text.SimpleDateFormat MMddyyyyHHmmss = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
              try
                   OraclePreparedStatement ps = (OraclePreparedStatement)conn.oraconnection.prepareStatement(sql);
                   String date = "12/12/2006 17:33:01";
                   java.util.Date ud = MMddyyyyHHmmss.parse(date);
                   java.sql.Date dd = new java.sql.Date(ud.getTime());
                   float ff = Integer.parseInt("1");
                   ps.setDate(1, dd);
                   ps.setFloat(2, ff);
                   ps.setInt(3, 4);
                   ps.setString(4, "This is test");
                   ps.executeUpdate();
              catch(Exception e)
                   e.printStackTrace();
    }Then I select from the table.
    select to_char(test.C_DATE, 'yyyy-MM-dd HH24:mi:ss')
    from test
    Its result is:
    2006-12-12 00:00:00
    I wanna to show 2006-12-12 17:33:01.
    How?

    Dear NiallMcG,
    Thank you very much, It now works fine.
    package main;
    import oracle.jdbc.driver.*;
    import oracledb.OraCon;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    public class inmain {
          * @param args
         public static void main(String[] args)
              OraCon conn = new OraCon();
              conn.alloc();
              String sql = "insert into test(c_Date, c_Float, c_Int, c_String) values (?,?,?,?)";
              java.text.SimpleDateFormat MMddyyyyHHmmss = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
              try
                   OraclePreparedStatement ps = (OraclePreparedStatement)conn.oraconnection.prepareStatement(sql);
                   String date = "12/12/2006 17:33:01";
                   java.util.Date ud = MMddyyyyHHmmss.parse(date);
                   float ff = Integer.parseInt("1");
                   Timestamp ts = new java.sql.Timestamp(ud.getTime());
                   ps.setTimestamp(1,ts);
                   ps.setFloat(2, ff);
                   ps.setInt(3, 4);
                   ps.setString(4, "This is test");
                   ps.executeUpdate();                    
              catch(Exception e)
                   e.printStackTrace();
              conn.release();
    }

  • How to insert XML/dtd data into oracle db

    Hi,
    I have posted this question on couple
    sites and unfortunately I haven't received
    any response. Hopefully this time,
    someone can at least direct me to the
    website/document/sample codes which can provide me solutions of my question.
    My question is:
    Given a DTD, can the XML SQL Utility generate
    the database schema?
    I am trying to find out how the XML data can
    be loaded into the oracle database.
    Thanks in advance,
    Judy
    null

    A DTD does not contain enough information to do a good job at creating a database schema. It contains no datatype information, no field length information for starters, so a table created by a hypothetical DTD->to->Tables utility would be at best able to create a table with all VARCHAR2(4000) columns. Not that useful.
    My book contains lots of examples of techniques for loading XML data into Oracle, include lots of sample code and a whole chapter devoted to building a flexible "XMLLoader" utility for loading XML of arbitrary size into the database.
    Steve Muench
    Development Lead, Oracle XSQL Pages Framework
    Lead Product Manager for BC4J and Lead XML Evangelist, Oracle Corp
    Author, Building Oracle XML Applications
    null

  • How to insert long text data in oracle for LONG column type??

    Anybody who can tell me what is best way to store long text (more than 8k) in Oralce table.
    I am using Long datatype for column but it still doenst let me insert longer strings.
    Also I am using ODP.Net.
    Anybody with a good suggestion???
    Thanks in advance

    Hi,
    Are you getting an error? If so, what?
    This works for me..
    Greg
    create table longtab(col1 varchar2(10), col2 long );
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    using System.Text;
    public class longwrite
    public static void Main()
    // make a long string
    StringBuilder sb = new StringBuilder();
    for (int i=0;i<55000;i++)
    sb.Append("a");
    sb.Append("Z");
    string indata = sb.ToString();
    Console.WriteLine("string length is {0}",indata .Length);
    // insert into database
    OracleConnection con = new OracleConnection("user id=scott;password=tiger;data source=orcl");
    con.Open();
    OracleCommand cmd = new OracleCommand();
    cmd.CommandText = "insert into longtab values(1,:longparam)";
    cmd.Connection = con;
    OracleParameter longparam = new OracleParameter("longparam",OracleDbType.Long,indata .Length);
    longparam.Direction = ParameterDirection.Input;
    longparam.Value = indata ;
    cmd.Parameters.Add(longparam);
    cmd.ExecuteNonQuery();
    Console.WriteLine("insert complete");
    //now retrieve it
    cmd.CommandText = "select rowid,col2 from longtab where col1 = 1";
    OracleDataReader reader = cmd.ExecuteReader();
    reader.Read();
    string outdata = (string)reader.GetOracleString(1);
    Console.WriteLine("string length is {0}",outdata.Length);
    //Console.WriteLine("string is {0}",outdata);
    reader.Close();     
    con.Close();
    con.Close();
    }

  • How to store other language data in oracle

    Hi,
    i am starter in oracle. Some of you may have faced this before and comee across the solution to the issue/query i am going to ask.
    I want to know how can i store data other than english in oracle data base and display them .

    ## I want to know how can i store data other than english in oracle data base
    When creating a database with Oracle Universal Installer or Database Configuration Assistant, select AL32UTF8 (Unicode UTF-8) as the database character set. This is basically the only requirement. I assume you do not try Oracle8i or older ;-)
    ## and display them .
    This is more complex. You should use client and application technologies that support Unicode. For example, web applications usually can do this if configured for encoding UTF-8.  However, most browsers will support only a subset of all languages spoken in the world due to font and keyboard support limitations. The supportable language set depends on the browser but mainly on the client operating system. You need to have a better idea what languages you want to support.
    Thanks,
    Sergiusz

  • How to show muliti language data correctly using webi reports

    Hi ,
    Can you please suggest me how to show multi language data correctly in webi reports .
    Do we need to install any lang pack in both server and client machine ?
    Thanks & Regards
    Venkat

    you mean using translation manager? or data from DB? or both.
    You need to make sure that your DB is already configured for multiple languages.
    Enable the OS for multi languages
    On XIR3.1, you will need to install language packs on the processing servers.  then you can utilize translation manager.
    Installation of Language Packs are a pain to install and update.

  • How to insert one table data into multiple tables by using procedure?

    How to insert one table data into multiple tables by using procedure?

    Below is the simple procedure. Try the below
    CREATE OR REPLACE PROCEDURE test_proc
    AS
    BEGIN
    INSERT ALL
      INTO emp_test1
      INTO emp_test2
      SELECT * FROM emp;
    END;
    If you want more examples you can refer below link
    multi-table inserts in oracle 9i
    Message was edited by: 000000

  • How to install multi language in Portal?

    Hi,
    Can someone give me the directions in how to install multi
    language in Portal? I found the "langinst.cmd" file under
    ORACLE_HOME\portal30\admin\plsql, also another
    file "langinst.sql" under ORACLE_HOME\portal30
    \admin\plsql\nlsres.
    I am not quite sure how I can do that, which file I should use.
    And once I installed the multi language, can I just go into
    portal to create a new content area and using the multi language?
    Thanks for any comment in advance!
    Kelly.

    Hi Kelly
    You need to identify parameters for this file and run file. Its
    langinst.cmd for WINNT and langinst.csh for UNIX.
    1.     From the dos prompt , go to the following directory on
    your server.
         Oracle/iSuites/portal30/admin/plsql/
    2.     Set the Oracle_Home to = oracle/iSuites/
    3.     Run the command
    langinst.csh -s portal30 -p portal30 -o
    PORTAL30_SSO -d PORTAL30_SSO -c oid -l ar -available
    s - schema
    p - password
    o - < login server - in your case it may be portal30_SSO >
    d - <password- maybe portal30_sso>
    c - connect string
    l - language (which is set to ar )
    ar is arabic which i ve set
    Good Luck
    Regards
    Yogesh

  • How to extract data from oracle database directly in to bi7.0 (net weaver)

    how to extract data from oracle database directly in to bi7.0 (net weaver)? is it something do with EDI? can anybody explain me in detail?
    Thanks
    York

    You can use UDConnect to get from Oracle database in to BW
    <b>Data Transfer with UD Connect -</b>
    http://help.sap.com/saphelp_nw04/helpdata/en/78/ef1441a509064abee6ffd6f38278fd/content.htm
    <b>Prerequisites</b>
    You have installed the SAP WAS J2EE Engine with BI Java components.  You can find more information on this in the SAP BW installation guide on the SAP Service Marketplace at service.sap.com/instguides.
    Hope it Helps
    Chetan
    @CP..

  • How to create a Macro in excel to store the excel data to Oracle Database

    Hi All
    Does anyone has created a macro in excel which on being run stores the excel data to Oracle database. In my project I need to create one such macro for updating oracle database with excel data and another for inserting excel records.
    I tried doing this using a macro in MS access but Client wants its to be done using Excel Macro only.
    Any help would be highly appreciated.
    Thanks in advance..
    Shikha

    Please read Chapter 19.7 Creating Selection Lists (http://download.oracle.com/docs/html/B25947_01/web_complex007.htm#CEGFJFED) of the Oracle® Application Development Framework Developer's Guide For Forms/4GL Developers 10g Release 3 (10.1.3.0)
    Cheers,
    Mick.

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

Maybe you are looking for

  • Reg Po creation in ME21N

    Hi all, I am fresher in SAP MM module. When i am creating PO in ME21 with reference to PR  , i am getting a short dump. How can i create PO in ME21N  with reference to PR  ??? Kind regards Karthik

  • Increase the Size of the Range Text Field in the Export Adobe PDF Dialog Box

    It's not unusual for me to export a wide range of pages and I hate that the text field for Range is so small, often cutting off from view many of the page numbers. There's a lot of blank space sitting there, begging to be used. A quick measurement sh

  • InDesign CC interactive PDF hyperlink issue on PC

    Exporting as an interactive PDF using links to open another PDF file and the link works fine on a MAC not a PC? Any idea how to get it to work on a PC?

  • Fit slideshow to music

    Just doing my first slideshows in iPhoto, having previously used iMovie. Had some image quality issues with a particular batch of photos for some reason, that seem to be fine in an iPhoto slideshow. However, the fir to music doesn't seem too good - i

  • Time out settings in a proxy

    Hi , I am calling a Proxy from a Function module... now the requirement is: if proxy exceeds the set  execution time, we need to kill the process and send a message to the user. Can we set a time out in Proxy? If so, Please let me know the configurat