Converting MS Access datatype to Oracle datatype

To convert a memo datatype in MS Access into Oracle, you use a Long datatype. The problem is this one Access table hold multiple memo dataype and Oracle only allows 1 long datatype per table. Does anyone know how to resolve this issue?

You should use CLOBs instead. You can have multiple
CLOBs per table.Further the number of LOB columns per table is limited only by the maximum number of columns per table.

Similar Messages

  • Convert IIF Access SQL to Oracle SQL...

    I am in the process of converting a MS Access application to VB.Net with Oracle database behind. However I am having a problem converting an MS Access Query that contains IIF statements into an Oracle SQL command. Below is the MS Access SQL code:
    SELECT PDTABLE_132.UNIQUE_CLASH_ID, CISClashStatusTbl.Approval_Type AS Clash_Status, CISClashTypeTbl.Clash_Type, *IIf([TEMP_ACTION_DISCIPLINE] Is Null,"UNALOCATED",[TEMP_ACTION_DISCIPLINE]) AS ACTION_DISCIPLINE*, *IIf([CISDisciplineTbl].[Discipline] Is Null,[PD_2910A_PDTABLE_111].[DISCIPLINE_NAME],[CISDisciplineTbl].[Discipline]) AS TEMP_ACTION_DISCIPLINE*
    FROM ((((((((((((PDTABLE_132 INNER JOIN PD_2910A_PDTABLE_113 ON PDTABLE_132.MODEL_INDEX_NO_A = PD_2910A_PDTABLE_113.MODEL_INDEX_NO) INNER JOIN PD_2910A_PDTABLE_113 AS PD_2910A_PDTABLE_113_1 ON PDTABLE_132.MODEL_INDEX_NO_B = PD_2910A_PDTABLE_113_1.MODEL_INDEX_NO) INNER JOIN PDTABLE_119 ON PD_2910A_PDTABLE_113.MODEL_INDEX_NO = PDTABLE_119.MODEL_INDEX_NO) INNER JOIN PDTABLE_119 AS PDTABLE_119_1 ON PD_2910A_PDTABLE_113_1.MODEL_INDEX_NO = PDTABLE_119_1.MODEL_INDEX_NO) LEFT JOIN CISClashStatusTbl ON PDTABLE_132.IF_APPROVAL_STATUS = CISClashStatusTbl.Approval_Code) LEFT JOIN CISClashTypeTbl ON PDTABLE_132.RECENT_CLASH_TYPE = CISClashTypeTbl.Clash_Code) INNER JOIN PD_2910A_PDTABLE_112 ON PD_2910A_PDTABLE_113.AREA_INDEX_NO = PD_2910A_PDTABLE_112.AREA_INDEX_NO) INNER JOIN PD_2910A_PDTABLE_112 AS PD_2910A_PDTABLE_112_1 ON PD_2910A_PDTABLE_113_1.AREA_INDEX_NO = PD_2910A_PDTABLE_112_1.AREA_INDEX_NO) LEFT JOIN CISOwnerTbl ON PDTABLE_132.UNIQUE_CLASH_ID = CISOwnerTbl.UNIQUE_CLASH_ID) LEFT JOIN CISDisciplineTbl ON CISOwnerTbl.Discipline_Code = CISDisciplineTbl.Discipline_Code) LEFT JOIN PD_2910A_PDTABLE_111 ON PDTABLE_132.ACTION_DISCIPLINE = PD_2910A_PDTABLE_111.DISCIPLINE_INDX_NO) LEFT JOIN PD_2910A_PDTABLE_111 AS PD_2910A_PDTABLE_111_1 ON PDTABLE_132.DISCIPLINE_INDEX_A = PD_2910A_PDTABLE_111_1.DISCIPLINE_INDX_NO) LEFT JOIN PD_2910A_PDTABLE_111 AS PD_2910A_PDTABLE_111_2 ON PDTABLE_132.DISCIPLINE_INDEX_B = PD_2910A_PDTABLE_111_2.DISCIPLINE_INDX_NO
    ORDER BY PDTABLE_132.UNIQUE_CLASH_ID;
    Any help would really be appreshiated.
    Thanks in advance
    Simon
    Edited by: user8275408 on 21-Jan-2010 07:25

    Hi, Simon,
    Welcome to the forum!
    An Oracle equivalent of
    IIf(TEMP_ACTION_DISCIPLINE Is Null,"UNALOCATED",TEMP_ACTION_DISCIPLINE) AS ACTION_DISCIPLINEis
    CASE
         WHEN  TEMP_ACTION_DISCIPLINE Is Null
         THEN  'UNALOCATED'
         ELSE  TEMP_ACTION_DISCIPLINE
    END          AS ACTION_DISCIPLINE, This assumes that temp_action_discipline is a string. (All THEN and ELSE clauses must return the same data type, or at least compatable types.)
    CASE is the most general way of doing IF-THE-ELSE logic in Oracle SQL.
    For certain special situations, there may be shorter ways.
    Testing a variable to see whether it is NULL or not is one of those situations, so you could also say
    NVL2 ( TEMP_ACTION_DISCIPLINE
         , TEMP_ACTION_DISCIPLINE
         , 'UNALOCATED'
    This site noramally compresses whitespace. Whenever you post formatted text here (and code should always be formatted), type these 6 characters:
    (all small letters, inside curly brackets) before and after formatted sections.
    Edited by: Frank Kulash on Jan 21, 2010 10:41 AM
    After reading Bluefrog's answer, I realized that you're testing and possibly returning the same thing, temp_action_discipline.
    In that case, NVL, like Bluefrog suggested, is the best thing to do.  CASE and NVL2, as shown above, will give the right results, but they're more complicated than you need for this job.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Converting Microsoft Access files to Oracle ables

    I have a table in Access that I want to export to Oracle. Where do I start.

    06401, 00000, "NETCMN: invalid driver designator"
    // *Cause:  The login (connect) string contains an invalid driver designator.
    // *Action: Correct the string and re-submit.

  • Convert ms access query to oracle view

    I was able to get bits and pieces of it to work, but not the whole thing. Let me know if you need the table structures.
    /* Show some summary information about the open problems in the Security Info table */
    select
    "Monthly report hide"
    , "Tracking id"
    , "Status"
    /* Show the date appropriate to the item status, if the item is open then show the */
    /* open date, if the item is closed, show the closed date */
    , decode("Status"='Closed',"Date closed","Date opened")
    as "Item date"
    , "Identifier"
    , "TicketNumber"
    /* Format deu date as ddd, m/d/yy */
    , "Due Date"
    /* show the person's name, id is kept in the table, DIR has cross ref */
    , (SELECT DIR.COMMON_NAME_LAST
    FROM DIR
    WHERE "Primary id" = ID
    ) as "Primary Staff"
    /* A separate table holds the status information for each problem, use the last */
    /* entry for this tracking id */
    , (select LAST("Status info")
    from SECINFOSTATUS
    where "Tracking id" = "Tracking id ref"
    group by
    ) as "Status Info"
    /* The next three fields are taken from the referenced organization links. There */
    /* are multipe entries for each tracking id in the referenced organization links */
    /* table. Use the first entry for the referenced tracking id. The first entry is */
    /* the one with the lowest "Ref link id" in SECINFOREFDORGLINKS. */
    , (select "Ref name"
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref"
    and "Ref link id" = (select min("Ref link id")
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref")
    ) as "Primary Ref Org"
    , (select "Ref reference number"
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref"
    and "Ref link id" = (select min("Ref link id")
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref")
    ) as "Primary Ref Id"
    , (select "Ref link"
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref"
    and "Ref link id" = (select min("Ref link id")
    from SECINFOREFDORGLINKS
    where "Tracking id" = "Tracking id ref")
    ) as "Primary Ref Link"
    from SECINFO
    /* Report only open problems. */
    where "Status" = 'Open'
    order by "Tracking id" DESC

    With some formatting (not easy in this forum at the moment I admit) it looks like this:
    SELECT "Monthly report hide"
         , "Tracking id"
         , "Status"
         , DECODE("Status",
                  'Closed',"Date closed", "Date opened") AS "Item date"
         , "Identifier"
         , "TicketNumber"
         , "Due Date"
         , ( SELECT dir.common_name_last
             FROM   dir
             WHERE  "Primary id" = id ) AS "Primary Staff"
         , ( SELECT LAST("Status info")
             FROM   secinfostatus
             WHERE  "Tracking id" = "Tracking id ref"
             GROUP BY ??? ) AS "Status Info"
         , ( SELECT "Ref name"
             FROM   secinforefdorglinks
             WHERE  "Tracking id" = "Tracking id ref"
             AND    "Ref link id" =
                    ( SELECT MIN("Ref link id")
                      FROM   secinforefdorglinks
                      WHERE  "Tracking id" = "Tracking id ref" ) ) AS "Primary Ref Org"
         , ( SELECT "Ref reference number"
             FROM   secinforefdorglinks
             WHERE  "Tracking id" = "Tracking id ref"
             AND    "Ref link id" =
                    ( SELECT MIN("Ref link id")
                      FROM   secinforefdorglinks
                      WHERE  "Tracking id" = "Tracking id ref") ) AS "Primary Ref Id"
         , ( SELECT "Ref link"
             FROM   secinforefdorglinks
             WHERE  "Tracking id" = "Tracking id ref"
             AND    "Ref link id" =
                    ( SELECT MIN("Ref link id")
                      FROM   secinforefdorglinks
                      WHERE  "Tracking id" = "Tracking id ref" ) ) AS "Primary Ref Link"
    FROM   secinfo
    WHERE  "Status" = 'Open'
    ORDER BY "Tracking id" DESC;It's made harder by those quoted column names - if you can change them to Oracle-standard names it should be easier to work with.
    As Khurram points out the main problem is that LAST() expression with half a GROUP BY clause. I'm guessing you want the last "Status info" value in order of some date or sequence key?

  • MS Access Crosstab to Oracle SQL

    Gurus,
    I am trying to convert MS Access Query to Oracle SQL, What would be the Oracle query for this MS Access Crosstab Query?
    I am working on Oracle 10g so, I can't take advantage of oracle PIVOT function.
    Thank you
    Edited by: 951334 on Aug 10, 2012 6:52 AM
    Edited by: 951334 on Aug 13, 2012 5:51 AM

    if your crosstab columns are static you can use well-known technique like
    select tablespace_name,
    sum(case segment_type when 'TABLE' then bytes end) TABLES_BYTES,
    sum(case segment_type when 'INDEX' then bytes end) INDEXES_BYTES,
    sum(case segment_type when 'LOBSEGMENT' then bytes end) LOB_BYTES
    from dba_segments
    group by tablespace_name;
    for dynamic crosstab columns you require to build this query dynamically in application

  • Access Query to Oracle View Tool

    We have a Access Database which creates forms and reports. It has lots of queries. we want the similar funtionalities in Oracle. Is there any tool that will convert these access queries to Oracle views. I used Migration workbench to convert the database but it can't convert the query.

    FYI,
    Microsoft Access is using ANSI SQL. And Oracle has introduced ANSI SQL from Oracle 9i so, it is also in 10g.
    Oracle 10g does not stop backward compatibilty so, It is depends on person. And I am not forcing you to migrate query from ACCESS to Oracle. I have simply answer the question which you have asked. Whether you want to perform efficiently or not it's your choice.
    But one thing is sure, ORACLE (9i or 10g) provides ANSI SQL and MS ACCESS is using ANSI sql so, this task is feasible. No doubt about it.

  • Access Query to Oracle Query conversion

    I am converting an Access database to Oracle 8.1.6.
    There are lot of reports in Access. HOw can I convert the Access
    query to Oracle equivalent query??? Is there any tool available
    for conversion???

    FYI,
    Microsoft Access is using ANSI SQL. And Oracle has introduced ANSI SQL from Oracle 9i so, it is also in 10g.
    Oracle 10g does not stop backward compatibilty so, It is depends on person. And I am not forcing you to migrate query from ACCESS to Oracle. I have simply answer the question which you have asked. Whether you want to perform efficiently or not it's your choice.
    But one thing is sure, ORACLE (9i or 10g) provides ANSI SQL and MS ACCESS is using ANSI sql so, this task is feasible. No doubt about it.

  • Converting ntext datatype of MS SQL to LOB datatype of Oracle using ODI

    Hi
    Could anyone help me how I can convert ntext datatype of MS SQL to BLOB/CLOB datatype of ORACLE using ODI tool? I have tried and it seems that ODI couldn't able to create working table with datatype of LOB.
    Thank you in advance.
    Myat

    Try using the Incremental Update (PL/SQL) IKM. I believe this will only handle 1 CLOB column in any interface - also pay attention to the KM notes for additional constraints and requirements.
    Make your staging area the same as the target.
    Use the TO_CLOB function to convert the data for your field, and execute this on the target.

  • How to convert number datatype to raw datatype for use in data warehouse?

    I am picking up the work of another grad student who assembled the initial data for a data warehouse, mapped out a dimensional dw and then created then initial fact and dimension tables. I am using oracle enterprise 11gR2. The student was new to oracle and used datatypes of NUMBER (without a length - defaulting to number(38) for dimension keys. The dw has 1 fact table and about 20 dimension tables at this point.
    Before refining the dw further, I have to translate all these dimension tables and convert all columns of Number and Number(n) (where n=1-38) to raw datatype with a length. The goal is to compact the size of the dw database significantly. With only a few exceptions every number column is a dimension key or attribute.
    The entire dw db is now sitting in a datapump dmp file. this has to be imported to the db instance and then somehow converted so all occurrences of a number datatype into raw datatypes. BTW, there are other datatypes present such as varchar2 and date.
    I discovered that datapump cannot convert number to raw in an import or export, so the instance tables once loaded using impdp will be the starting point.
    I found there is a utl_raw package delivered with oracle to facilitate using the raw datatype. This has a numbertoraw function. Never used it and am unsure how to incorporate this in the table conversions. I also hope to use OWB capabilities at some point but I have never used it and only know that it has a lot of analytical capabilities. As a preliminary step I have done partial imports and determined the max length of every number column so I can alter the present schema number columns tp be an apporpriate max length for each column in each table.
    Right now I am not sure what the next step is. Any suggestions for the data conversion steps would be appreciated.

    Hi there,
    The post about "Convert Numbers" might help in your case. You might also interested in "Anydata cast" or transformations.
    Thanks,

  • TIMESTAMP datatype in Oracle 8i.

    'TIMESTAMP' datatype is not to be available in Oracle 8i.
    Is there an equivalent datatype in Oracle 8i as 'TIMESTAMP' in 9i?
    Regards,
    Bhagat

    Timestamp was a new globalization feature in 9i. The only way to handle time in 8i is with the regular DATE type and traditional date arithmetics.

  • How to handle national character set datatypes in oracle?

    Hi
    Can anyone tell me how to handle national character set datatypes in oracle?
    Thanks in advance

    And for data manipulation, append "N" the literal values being used in the command.
    The "N" indicates that the string is to be treated as Unicode Text.
    For Example: insert into TableName (ColumnName) values (N'ValueToBeInserted');

  • Equivalent datatype in Oracle for datetime of SQL Server

    Hello Everyone,
    I'm very much new to Oracle. I have been working with SQL Server since 3yrs. Currently I'm working with Oracle 11g.
    What is the equivalent datatype in oracle for datetime in sql server with which has the format YYYY-MM-DD HH:MM:SS?
    I tried with timestamp and date which didnt solve my prob.... Please help me in using the equivalent datatype for the format provided above...
    Regards,
    Bhanu Yalamanchi.

    Oracle date format can be anything you want, either by default at the session level or preferably explicitly using to_char and a format mask.
    Format masks are documented here.
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements004.htm#CDEHIFJA
    SQL> create table t (d date);
    Table created.
    SQL> insert into t values (sysdate);
    1 row created.
    SQL> select * from t;
    D
    19-JUL-11
    SQL> alter session set nls_date_format = 'YYYY-MM-DD HH:MI:SS';
    Session altered.
    SQL> select * from t;
    D
    2011-07-19 08:27:59
    SQL> select d, to_char(d, 'YYYY-MM-DD'), to_char(d,'Day') from t;
    D                   TO_CHAR(D, TO_CHAR(D
    2011-07-19 08:27:59 2011-07-19 Tuesday
    SQL> alter session set nls_date_format = 'DD-MON-YY';
    Session altered.
    SQL> select d, to_char(d, 'YYYY-MM-DD HH24:MI:SS') from t;
    D         TO_CHAR(D,'YYYY-MM-
    19-JUL-11 2011-07-19 08:27:59

  • Custom datatypes in oracle

    hi,
    i need to know about custom datatypes in oracle? Where can i get that. Any good link which explains the topic???
    Thanks,
    Noble

    How about starting with the documentation...
    http://www.oracle.com/pls/db102/search?remark=quick_search&word=user+defined+datatypes&tab_id=&format=ranked

  • Oracle Datatype references in JDBC

    I am using JDBC to execute some stored procedures in Oracle 8.1.7. The stored procedures use user-defined Object type in the database.
    My problem is that, even though all these object data types have public synonymns and have granted execute permissions to all users, when I try to reference any of these datatypes I have to qualify it by the datatype owner name. e.g., datatype name is SOMEDATATYPE owned by DEVEL and if I am logging into to the database (using JDBC) with the userid OTHERDEV then I can register the datatype only as follows:
    m_oCallableStmt.registerOutParameter(1, OracleTypes.STRUCT, "DEVEL.SOMEDATATYPE");
    I have to use the full qualifier even when creating the STRUCT using the StructDescriptor.createDescriptor.
    Problem is when I need to migrate the code to production where the datatypes are owned by production ID, I have to change the qualifier either by storing it in some properties file or passing it as an init parameter to the servlet. Both of which are work arounds and not good solutions for what I am trying to do. JDBC should be able to use the public synonymns for Oracle Datatypes.
    I must be missing something! Could someone please tell me what I could do to resolve this issue??

    I think storing in the properties file is not a bad idea given your situation, because to me it looks like your jdbc driver doesn't support full 2.0 specification.
    Take a look at http://java.sun.com/j2se/1.4/docs/api/java/sql/CallableStatement.html#registerOutParameter(int, int, java.lang.String)
    Better you look at chapters 7 & 8 in http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/GettingStartedTOC.fm.html
    Basically you should be able to map java objects with your user defined sql data objects/structs, register the java objects using setObject() and getObject() methods blah blah blah.
    I'd rather go with properties files since I'm always under time constraints.!!

  • Mapping datatype in oracle goldengate

    Hi
    Is it possible to map datatype in oracle goldengate? Suppose we have same table name on both source & target database but column widths are different.

    Hi again,
    It might be possible to code a mapping post processor that transforms eg. a column definition: my_column_clob varchar2(4000) => my_column clob
    but I have no clue on how the runtime platform would react to this, eg. when reporting detailed errors. Implementing on your own means that you will lose some standard OWB functionality also - eg. upgrade/import table.
    Regards, Hans Henrik

Maybe you are looking for