How to migrate 'table' data type into oracle solution?

Say, I have following sample code in Sql Server:
Declare @v1 table(old_value int, new_value int)
insert into @v1 select old_value, new_value from aTable where....
declare cur cursor for
select new_value from @v1 where old_value=...
what should I use in oracle to convert above code? I was thinking about nested table, but it seems not very suitable here. Any better solutions out there?

It's been a while since I've done any SQL Server development, but if I recall correctly, a table data type in Transact SQL is used for storing temporary result sets.
In your example, you seem to be temporaily storing the results of a query in a Transact SQL table, and then opening a cursor to iterate over the results.
In Oracle PL/SQL, there is usually no need to do this, just open a cursor:
create or replace procedure test_proc as
begin
for curs_rec in (select old_value, new_value from myTable) loop
... process each row ...
end loop;
end test_proc;
If you really want your results in an array which your code can iterate over, look into the BULK COLLECT clause of the SELECT statement:
create or replace procedure test_proc as
TYPE array_type IS TABLE of myTable%ROWTYPE INDEX BY BINARY_INTEGER;
my_array array_type;
begin
SELECT * BULK COLLECT INTO my_array FROM myTable;
for idx in my_array.FIRST..my_array.LAST loop
dbms_output.put_line(my_array(idx).col1);
end loop;
end test_proc;
Note that I have not actually compiled the above code, so there may be syntax errors :)
Also, prior to 9i you can not BULK COLLECT into a table based on a rowtype (you need to created an array for each attribute).
SQL Server also allows function which return table types. This is similar to PL/SQL pipelined table functions (available in 9i and higher - see the PL/SQL guide), which can be used to materialize rows which can be processed like any other result set.
SQL Server also has a concept of temporary tables which is totally different than Oracle's temporary tables. SQL Server developers must often resort to using temporary tables in their stored procedures; in Oracle, this is rarely necessary.

Similar Messages

  • How to import a data dump into Oracle express

    Hi
    Thank you for reading my post
    how i can import a data dump which is a dump of my Schema in oracle 10g into oracle database express ?
    indeed it is just 20 tables and one sequence that i exported from oracle 10g and i want to import it into my oracle express 10g
    thanks

    Hi,
    I
    1) export the data from your source database XE
    C:\WINDOWS\system32>exp userid=USER1@XE1 file=user1.dmp
    2) in the target XE database you would have to recreate the same user, e.g. USER1
    3) run imp on the same dump file:
    C:\WINDOWS\system32>imp userid=USER1@xe2 file=user1.dmp full=yes ignore=yes
    II
    From DOS prompt make directory
    DOS>md c:\oraclexe\tmp
    DOS>cd c:\oraclexe\app\product\10.2.0\server\BIN
    DOS>sqlplus SYS/Password AS SYSDBA
    It is posible to be SYS/Password@SID AS SYSDBA
    SQLPlus>CREATE OR REPLACE DIRECTORY XMLDIR AS 'C:\oraclexe\Tmp';
    SQLPlus>GRANT READ, WRITE ON DIRECTORY XMLDIR TO property;
    Go back to DOS prompt. There are two files - expdp.exe and impdp.exe in BIN directory.
    DOS>expdp SYS/Password AS SYSDBA SCHEMAS=property DIRECTORY=XMLDIR DUMPFILE=property.dmp LOGFILE=property.log
    From DOS prompt make directory
    DOS>md c:\oraclexe\tmp
    DOS>cd c:\oraclexe\app\product\10.2.0\server\BIN
    DOS>sqlplus SYS/Password AS SYSDBA
    It is posible to be SYS/Password@SID AS SYSDBA
    SQLPlus>ALTER SYSTEM SET NLS_LENGTH_SIMANTICS='CHAR' SCOPE=BOTH;
    SQLPlus>CREATE OR REPLACE DIRECTORY dmpdir AS 'C:\oraclexe\Tmp';
    SQLPlus>GRANT READ, WRITE ON DIRECTORY XMLDIR TO public;
    Go back to DOS prompt. There are two files - expdp.exe and impdp.exe in BIN directory.
    DOS>impdp SYS/Password AS SYSDBA SCHEMAS=property DIRECTORY=XMLDIR DUMPFILE=property.dmp LOGFILE=property.log
    There are so many treads about export and import in XE.
    Konstantin

  • How to write a data type into an excel file?

    Hi everyone,
    What I am trying to do is to get some data from MS SQL then write into an excel file.
    stmtExcel.executeUpdate("Insert into [Output$] (CustomerID, ProductID, [Date], OrderQty) Values(" + rsSQL.getInt("CustomerID") + ", " + rsSQL.getInt("ProductID") + ", '" + (rsSQL.getString("Date")).substring(0,10) + "', " + rsSQL.getInt("OrderQty") + ")");
    There is no problem to write into an excel file, however, after all data is imported, excel sheet treats the the integers or dates as Text format. The funny part is, after I double click one of the cells with an integer value, that cell's format will be changed to integer, same thing happens with the date type.
    I am wondering if there is any way I can write an integer or whatever type into an excel file, which excel can recognize their own types instead of Text format. Thank you so much in advance.
    Sincerely,

    Yes, use an API that supports such things, like Andy
    Khan's JExcel:
    http://www.andykhan.com/
    %Thanks, duffymo. I haven't tried it yet, but according to the website, it seems that is possible! thanks again!

  • Convert MS SQL server image data type into oracle clob

    Hi all! I'm tryng to access to Microsoft SQL server with Oracle via ODBC. Oracle is not able to use the image data type of Microsoft SQL server. Do you know a way to convert this data type in an oracle format? The explicit casting converts image to long raw, but after the conversion Oracle is not able to manage these data type. Thank you very much!
    Stefano.

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • How to import a data base into oracle 10g.

    hi all
    when am using the scott/tiger username and password in the SQL plus i got this msg..
    "the account is locked"
    how can i solve this issue?
    and when i use the same username and password scott/tiger in addition to define a Host string " orcl" which is my new automatically generated database while installation.. it gives me this msg: TNS: no listener.
    any help ?
    by the way i succeed to login using .. system/zaq123 which is my own created password while installing oracle 10g ....ver 10.1.2.0 ..... in addition to the Host string "orcl" ......

    If you're not familiar with OEM, or you want to learn, you can unlock that account from SQL*Plus, too.
    And when you unlocked SCOTT, don't forget to look after your TNSNAMES and LISTENER configuration...
    Good luck!

  • Data Types from Oracle Sample Schema

    Hi,
    I was trying to push some data from an Oracle Sample schema (Schema: OE Table: Customers) to a target schema. The interface was erroring out because of undefined data types in the model.
    I chkd the model, only to find that some of the data types were undefined.
    I DESCribed the table in the using SQL Client, The data types returned were
    CUST_ADDRESS_TYP
    PHONE_LIST_TYP
    MDSYS.SDO_GEOMETRY
    I DESCribed the datatypes, They seem to be flexfields of some kind,
    Please advise on how to define these data types into ODI:
    Heres the DESC output
    SQL> desc customers;
    Name Null? Type
    CUSTOMER_ID NOT NULL NUMBER(6)
    CUST_FIRST_NAME NOT NULL VARCHAR2(20)
    CUST_LAST_NAME NOT NULL VARCHAR2(20)
    CUST_ADDRESS CUST_ADDRESS_TYP
    PHONE_NUMBERS PHONE_LIST_TYP
    NLS_LANGUAGE VARCHAR2(3)
    NLS_TERRITORY VARCHAR2(30)
    CREDIT_LIMIT NUMBER(9,2)
    CUST_EMAIL VARCHAR2(30)
    ACCOUNT_MGR_ID NUMBER(6)
    CUST_GEO_LOCATION MDSYS.SDO_GEOMETRY
    DATE_OF_BIRTH DATE
    MARITAL_STATUS VARCHAR2(20)
    GENDER VARCHAR2(1)
    INCOME_LEVEL VARCHAR2(20)
    SQL> desc CUST_ADDRESS_TYP;
    Name Null? Type
    STREET_ADDRESS VARCHAR2(40)
    POSTAL_CODE VARCHAR2(10)
    CITY VARCHAR2(30)
    STATE_PROVINCE VARCHAR2(10)
    COUNTRY_ID CHAR(2)
    SQL> desc phone_list_typ;
    phone_list_typ VARRAY(5) OF VARCHAR2(25)

    To create MDSYS.SDO_GEOMETRY datatype, goes to Topology module, Oracle Techonology, Datatypes, and add a new datatype GEOMETRY. (try to fill all information fields with GEOMETRY and see what happens maybe you have to ajust this after but it is a start point).
    add information in from and to tabs according your source and target desired tech.
    Reverse againg your model, or change the datatype in the model datastore. Re-run your interface

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Migrating Sybase "timestamp" data type to Oracle DB

    Hi,
    We are migrating huge Application currently running on Sybase database
    to Oracle 10.2.0.3 (500+ Tables and Stored Procedures).
    Have following questions regarding this Migration.
    1) Many of the Sybase Tables have column which is of Sybase data type "timestamp".
    Do you have any recommendation what is the data type to be used in Oracle for
    migrating "timestamp" data type in Sybase?
    2) How should we migrate existing data and business logic residing in Sybase for
    data columns of Sybase data type "timestamp" ?
    Given below are details on how we use Sybase timestamp Column in our Application
    and we are trying to arrive at the best Solution that is possible for migrating
    all those Tables and related business logic to Oracle.
    We have following Control Table in Sybase which has column of timestamp data type and
    some other Business keys.
    sp_help EQP_IES_CRE_TIMESTAMP (This is similar to desc <table> command in Oracle)
    EQP_IES_CRE_TIMESTAMP,dbo,user table
    default,Nov 14 2001 10:39AM
    CRE_TIMESTAMP ,timestamp,8,,,0,,,,0
    REF_NUM ,char,30,,,0,,,,0
    REC_UPD_DT ,datetime,8,,,1,,,,0
    EQP_IES_CRE_TIMESTAMPI1,clustered, unique located on default, CRE_TIMESTAMP, REF_NUM, REC_UPD_DT,0,0,0,
    Following is the overall logic used in Sybase
    -- Step 1: Based on Event, populate Control Table with new Row.
    -- CRE_TIMESTAMP timestamp Column gets auto-populated by Sybase
    insert EQP_IES_CRE_TIMESTAMP (REF_NUM, REC_UPD_DT)
    values (@uuid_ref_num, @event_cre_dt)
    Since CRE_TIMESTAMP is auto-populated, it does not appear in above INSERT statement.
    -- Step 2: Store timestamp value populated by Sybase in previous step,
    -- to variable @event_timestamp. This value would be referenced
    -- later in other SQL statements
    select @event_timestamp = CRE_TIMESTAMP
    from EQP_IES_CRE_TIMESTAMP
    where REF_NUM = @uuid_ref_num
    and REC_UPD_DT = @event_cre_dt
    -- Sample value for @event_timestamp could be '001c0000182f2089'
    -- It is not very readable or understandable
    -- Step 3: Delete Control Table entry made in Step 1
    delete EQP_IES_CRE_TIMESTAMP from EQP_IES_CRE_TIMESTAMP
    where CRE_TIMESTAMP = @event_timestamp
    -- Step 4: Make use of saved timestamp value from Step 2 to trigger queries
    -- against other Tables that have timestamp Columns
    -- Some sample queries are as shown below
    delete eqp_staging
    where event_timestamp > @event_timestamp;
    insert into eqp_movement values(@event_timestamp, ......other columns) ;
    Any idea how above Table and logic could be migrated to Oracle DB
    We would also like to know how data values that currently exist
    in Sybase Tables should be populated in Oracle .
    Any suggestions or tips would be greatly appreciated
    Thanks
    Auroprem

    Hi All,
    Thanks for your responses.
    We have decided on Solution to migrate "timestamp" Column from Sybase to Oracle, that is
    specific to our Application needs.
    Following is what we decided:
    1) Create RAW Column in Oracle which would contain data Replicated from Sybase "timestamp" Column as is.
    2) Create additional Column of INTEGER data type to store number equivalent of Sybase "timestamp" column
    which would be more usable and consummable in Oracle as compared to RAW datatype.
    3) Write Row-Level INSERT/UPDATE Trigger on migrated Oracle Table to populate INTEGER Column using
    SQL Function TO_NUMBER(<raw_column_value>, 'xxxxxxxx').
    4) Applications that access this Table, upon migration to Oracle, will now start referencing INTEGER Column
    newly defined, and populated via Trigger.
    Please let us know if you see any issues with this approach
    Thanks
    user641521

  • Access 97 to Oracle 9i - Unable to migrate table data

    I cannot seem to get the Access security set correctly to migrate the table data. I created a new Access database by importing the old one into a blank, and I thought I was doing what needed to be done to allow READ access for the Workbench. I'm getting nowhere!
    The WB is creating the model correctly and creating the tablespaces, users and table objects in my Oracle database. But it is not able to migrate table data due to insufficient rights to the Access tables.
    Any thoughts? I can't seem to find an answer to this in any documentation.
    Thanks in advance.

    Did you (or anyone) ever find a solution to this problem? I am having a similar issue. I have even tried creating a new Access 97 database (blank db w/imported tables). All permissions are set for the default 'Admin' user and the 'Admin' user is the owner of all tables.

  • How to pass table data into below code for alv

    hi
    i want to pass table data into alvgrid
    i dont know how to pass table data.
    here instead of passing ABC into internal table
    i want to pass table data .
    please help me
    ialv-test1 = 'ABC'.
    form get_data.
    ialv-test1 = 'ABC'.
    ialv-test2 = 'DEF'.
    append ialv.
    ialv-test1 = 'GHI'.
    ialv-test2 = 'JKL'.
    append ialv.
    ialv-test1 = '123'.
    ialv-test2 = '456'.
    append ialv.
    endform
    thanks in advanced.

    Have a look at below links. It gives you sample code of alv grid.
    http://sap.niraj.tripod.com/id64.html
    http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
    Have a look at below links for SAP Help.
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/content.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/12/904f42d5f811d2b469006094192fe3/content.htm
    Best Regards,
    Vibha
    *Please mark all the helpful answers

  • 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;
       }

  • Is there a auto-increment data type in Oracle

    Is there a auto-increment data type in Oracle ?
    How to do it if there is no auto-increment data type in Oracle ?
    null

    jackie (guest) wrote:
    : Is there a auto-increment data type in Oracle ?
    : How to do it if there is no auto-increment data type in Oracle
    Hi,
    I think you need unique ID's, for this purpose you use sequences
    in Oracle. Example:
    create table xy (
    id number,
    name varchar2(100)
    alter table xy
    add constraint xy_pk primary key(id);
    create sequence xy_seq start with 1 maxvalue 99999999999;
    (there are many other options for create sequence)
    create or replace trigger xy_ins_trg
    before insert on xy
    for each row
    begin
    select xy_seq.nextval
    into :new.id
    from dual;
    end;
    This produces a unique value for the column id at each insert.
    Hope this will help.
    peter
    null

  • ....Date Type in Oracle

    Hi All,
    Just to clear a few misconception/ambiguities regarding the DATE data type in Oracle.
    We hve a table which stores the date of insertion of a record. The front end application is in PHP while backend is in oracle.
    When i query the table, it shows the date as dd-mon-yy , but it does not show the time. I have tried to query it throgh sqlPLus , TOAD and the PHP Application, but it doesnt show the time.
    Is it not storing the time. The data type of the column is ( Insertdate date).
    If you query sysdate, it definitly stores time, ... but what is in this case. Is it just storing the date and not the time. ???
    How to alter so that it stores time as well.
    Regards

    U have to use the conversion function to_date to
    store date along with time. No, you use to_date to convert a string to a date. That's it. A date column will ALWAYS store the time (it just won't always display it)
    When u need to retrieve the data use to_char function. Not necessarily:
    SQL> create table x (dte date);
    Table created.
    SQL> insert into x values(sysdate);
    1 row created.
    SQL> insert into x values(sysdate+1);
    1 row created.
    SQL> select * from x;
    DTE
    11-jul-2007 09:13:11
    12-jul-2007 09:13:11
    if u want to store time u can use timestamp data typeNope, You use timestamp if you want to store fractions of seconds (down to nano seconds)
    The key point is. The date datatype ALWAYS stores:
    Century, Year, Month, Day, Hour, Minute, Second

  • UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I

    제품 : SQL*PLUS
    작성날짜 : 2001-08-01
    UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
    ========================================================
    PURPOSE
    Oracle 9i 에서 소개되는 새로운 datetime data type 에 대해 소개한다.
    Explanation
    Example
    1. Datetime Datatypes
    1) TIMESTAMP
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    2) TIMESTAMP WITH TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/
    TIMEZONE_HOUR/TIMEZONE_MINUTE( +09:00 )
    or TIMEZONE_REGION( Asia/Seoul )
    3) TIMESTAMP WITH LOCAL TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    4) TIME WITH TIME ZONE
    : HOUR/MINUTE/SECOND/TIMEZONE_HOUR/TIMEZONE_MINUTE
    2. Datetime Fields
    1) YEAR/MONTH/DAY/HOUR/MINUTE
    2) SECOND(00 to 59.9(N) is precision) : Range 0 to 9, default is 6
    3) TIMEZONE_HOUR : -12 to 13
    4) TIMEZONE_MINUTE : 00 to 59
    5) TIMEZONE_REGION : Listed in v$timezone_names
    3. DATE 와 TIMESTAMP 와의 차이점
    SQL> select hiredate from emp;
    HIREDATE
    17-DEC-80
    20-FEB-81
    SQL> alter table employees modify hiredate timestamp;
    SQL> select hiredate from employees;
    HIREDATE
    17-DEC-80 12.00.00.000000 AM
    20-FEB-81 12.00.00.000000 AM
    단, 해당 Column 에 Data 가 있다면 DATE/TIMESTAMP -> TIMESTAMP WITH
    TIME ZONE 으로 Convert 할 수 없다.
    SQL> alter table employees modify hiredate timestamp with time zone;
    alter table employees modify hiredate timestamp with time zone
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    4. TIMESTAMP WITH TIME ZONE Datatype
    TIMESTAMP '2001-05-24 10:00:00 +09:00'
    TIMESTAMP '2001-05-24 10:00:00 Asia/Seoul'
    TIMESTAMP '2001-05-24 10:00:00 KST'
    5. TIMESTAMP WITH LOCAL TIME ZONE Datatype
    SQL> create table date_tab (date_col TIMESTAMP WITH LOCAL TIME ZONE);
    SQL> insert into date_tab values ('15-NOV-00 09:34:28 AM');
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 09.34.28.000000 AM
    SQL> alter session set TIME_ZONE = 'EUROPE/LONDON';
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 12.34.28.000000 AM
    6. INTERVAL Datatypes
    1) INTERVAL YEAR(year_precision) TO MONTH
    : YEAR/MONTH
    : Year_precision default value is 2
    SQL> create table orders (warranty interval year to month);
    SQL> insert into orders values ('2-6');
    SQL> select warranty from orders;
    WARRANTY
    +02-06
    2) INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)
    : DAY/HOUR/MINUTE/SECOND
    : Logon time 확인시 주로 사용
    : day_precision range 0 to 9, default is 2
    SQL> create table orders (warranty interval day(2) to second);
    SQL> insert into orders values ('90 00:00:00');
    SQL> select warranty from orders;
    WARRANTY
    +90 00:00:00.000000
    7. Interval Fields
    - YEAR : Any positive or negative integer
    - MONTH : 00 to 11
    - DAY : Any positive or negative integer
    - HOUR : 00 to 23
    - MINUTE : 00 to 59
    - SECOND : 00 to 59.9(N) where 9(N) is precision
    8. Using Time Zones
    1) Database operation
    - Defined at CREATE DATABASE
    - Can be altered with ALTER DATABASE
    - Current value given by DBTIMEZONE
    2) Session operation
    - Defined with environment variable ORA_SDTZ
    - Can be altered with ALTER SESSION SET TIME_ZONE
    - Current value given by SESSIONTIMEZONE
    3) TIMESTAMP WITH LOCAL TIMEZONE
    - TIME_ZONE Session parameter
    : O/S Local Time Zone
    Alter session set time_zone = '-05:00';
    : An absolute offset
    Alter session set time_zone = dbtimezone;
    : Database time zone
    Alter session set time_zone = local;
    : A named region
    Alter session set time_zone = 'America/New_York';
    Reference Document
    ------------------

    Hi ,
    I am facing the same problem and my scenario is also same (BAPI's).
    So can you please tell me how you overcome this problem .
    Thanks,
    Rahul

  • How to export sql server 2000 into oracle intergrally?

    1.environment:
    sql server 200 - character set: CHINESE_PRC_CI_AS
    tables :include ntext field (I think it equals clob)
    support english,simple chinese character.
    oracle 9i - character set :NLS_LANG=AMERICAN_AMERICA.US7ASCII
    2. aim
    export sql server objects(main is tables) into oracle intergrally
    3.question:
    3.1 the field which includes chinese data,after exporting,displays "????" code.
    3.2 how to export sql ntext field into oracle?
    thanks a lot

    You need to setup your Oracle Database use character set that support Chinesre Character. For example a unicode character set AL16UTF16.
    More information her
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14225/ch6unicode.htm#i1006691
    Also consider use Oracle Migration Workbench to transfer SQL Server Data
    http://www.oracle.com/technology/tech/migration/workbench/files/mig_rel10104.html

Maybe you are looking for

  • How do I stop sound from playing when I leave frame?

    I have designed a website for an advertising agency using Flash and ActionScript 3. In the portfolio page, I have several TV commercials that are available to play. What I need is 1) when the user leaves the TV ad page, I want the tv commercial to qu

  • Editing a smartform in non-original lang.

    Hello All, Could you please tell me how a smartform works when we edit it in a language which is not its original language? If i change the original Lang from RU to EN(in the pop up), the changes I make in EN are not getting reflected in RU. And also

  • What's going on with SWDC ? Can't find certain downloadables...

    Hello people I was able to download SOLMAN 7.0 EHP1 few days ago. Today, it's gone, it was under technology components  as a separate item but today there is only SOLMAN 7.0. Also ECC6.0 does not exist in download area too. I'm sure it was there last

  • Oracle 9.2.0.1.0 installation link problems.....HELP !!!!!!

    Hi All During installation of Oracle 9.2.0.1.0 on Linux, I received the following error: Error: Error in invoking target install of makefile /opt/oracle/product/9.2.0.1.0/network/lib/ins_oemagent.mk I did some research and found that it is executing

  • Safari has no windows and freezes when trying to report

    When I start Safari (1.3.2) it bounces and the menu line appears - after that nothing happens. I have tried to empty caches, trash the preferences and even downloading an upgrade, which doesn't work on my eMac I have tried Repair permission but it st