Converting a MS Access Query to Oracle SQL

Hi,
We have a large number of MS Access (2000) queries (mostly select queries -Some containing sub queries-) that need to be converted to Oracle's syntax to be used on our intranet instead of the existing Access frontend.
Do you know of a tool that can do this?
We understand that conversion tools are not always reliable, but even if 75% of the queries are converted for us we can then focus on the ones that pose problems.
Regards,
Charles McGrotty

Hi Charles,
The next release of OMWB ( version 92017, due at the end of this year) will contain some support for Select and Action queries. In that version, we will load queries from the source MS Access database into the OMWB repository. Since the MS Access plugin for OMWB does not currently contain a parser, the query text will be commented out and surrounded in an Oracle View stub - this means that the queries can, at least, be migrated to Oracle and then manually converted by the migrator from within the Oracle database. Often, the body text for a select query exactly matches the syntax for an Oracle view, so the manual work required to convert the queries may be minimal. This will be the first step in migrating MS Access Queries that the OMWB provides.
I hope this information is useful,
Tom.

Similar Messages

  • 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

  • MS Access Query to Oracle

    Hi Gurus
    I am trying to convert a MS Access query to Oracle query, Having some trouble Need some help Please.
    This is the MS Access Query:
    Sum(IIf(LOAD1!ARRIVDATE<+Date()+7,LOADLINE1!QTY,0)/ITEM1!UOM) AS Loadtbl
    What would be the Oracle Query???
    Thank you

    Hello,
    well, the problem is the name of the column, ARRIVDATE< - while MS Access allows the "<" inside a column name, Oracle doesn't if you don't be careful. Please see this:
    SQL> create table testtab1 (arrivdate varchar2(100));
    Table created.
    SQL> desc testtab1
    Name Null? Type
    ARRIVDATE VARCHAR2(100)
    SQL> create table testtab2 (arrivdate< varchar2(100));
    create table testtab2 (arrivdate< varchar2(100))
    ERROR at line 1:
    ORA-00902: invalid datatype
    But this works:
    SQL> create table testtab2("ARRIVDATE<" varchar2(100));
    Table created.
    SQL> desc testtab2
    Name Null? Type
    ARRIVDATE< VARCHAR2(100)
    So your query might work if you put ARRIVDATE< in double quotes:
    Sum(DECODE(LOAD1."ARRIVDATE<"+SYSDATE+7,LOADLINE1.QTY,0)/ITEM1.UOM) AS Loadtbl
    Regards
    Wolfgang
    Edited by: wkobargs on Aug 8, 2012 7:51 AM
    Edited by: wkobargs on Aug 8, 2012 7:59 AM
    Edited by: wkobargs on Aug 8, 2012 8:00 AM

  • 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.

  • Migration: Access 2003 to Oracle SQL

    Dear All
    I would like to perform a migration from Access 2003, to Oracle 10g. I am using SQL Developer for the task, and have reached the point of capturing the XML file that I exported from Access. I need to create a migration repository on the target database, and this is causing problems as I do not have all the necessary privileges.
    In the process, I have been advised that migrations from Access to Oracle are not easy to achieve, and in fact require careful planning before execution. My objective is not really to transfer the data stored within the database file. I only really want to convert Access logic into Oracle SQL code. I was wondering if anyone could advise on the typical odds of success in achieving this task.
    I migrated the same Access database to MS SQL Server some time ago and the process seemed to go smoothly. Would it be reasonable then to migrate from MS SQL to Oracle SQL if this is easier?
    Any feedback would be very much appreciated.
    Thank you.
    M

    Thanks for your response.
    I am not familiar with the intricacies of the process, I'm just following the instructions set out in the Oracle Migrating 3rd Party Databases white paper.
    In this document, a process is set out consisting of steps that export an Access database, and then capture it to an Oracle user area with appropriate privileges. The process is achieved through Oracle SQL Developer.
    I'd be very grateful if you could expand on your answer if there is a better way of translating Access queries into Oracle SQL. I am aware that an Access front-end is capable of connecting with an Oracle database to execute queries, however, there are considerable limitations in the use of Access that I would like to avoid - hence the migration.

  • Convert Sybase Update from query to Oracle PL/SQL

    Hi,
    I have a following Sybase Query for updating a table CRM_Report from another table CRM_Report1 r1, which I have to migrate PL/SQL.
    update CRM_Report
    set LT_MMT = r1.LT_MMT, ST_MMT = r1.ST_MMT,
    LT_FixedInc = r1.LT_FixedInc, ST_FixedInc = r1.ST_FixedInc,
    LT_CrdCLN = r1.LT_CrdCLN, ST_CrdCLN = r1.ST_CrdCLN,
    LT_Der = r1.LT_Der, ST_Der = r1.ST_Der,
    LT_FX = r1.LT_FX, ST_FX = r1.ST_FX,
    LT_CrdCDS = r1.LT_CrdCDS, ST_CrdCDS = r1.ST_CrdCDS
    from CRM_Report1 r1
    where r1.Location = CRM_Report.Location
    and r1.CountriesGrp_Id = CRM_Report.CountriesGrp_Id
    and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName
    I used Oracle SQL Developer for query migration, but it doesn't seem to work
    Any Suggestions.

    In oracle
    update CRM_Report
       set (
            LT_MMT,
            ST_MMT,
            LT_FixedInc,
            ST_FixedInc,
            LT_CrdCLN,
            ST_CrdCLN,
            LT_Der,
            ST_Der,
            LT_FX,
            ST_FX,
            LT_CrdCDS,
            ST_CrdCDS
           ) =
           (SELECT r1.LT_MMT,
                       r1.ST_MMT,
                       r1.LT_FixedInc,
                       r1.ST_FixedInc,
                       r1.LT_CrdCLN,
                       r1.ST_CrdCLN,
                       r1.LT_Der,
                       r1.ST_Der,
                       r1.LT_FX,
                       r1.ST_FX,
                       r1.LT_CrdCDS,
                       r1.ST_CrdCDS
              from CRM_Report1 r1
          where r1.Location            = CRM_Report.Location
            and r1.CountriesGrp_Id       = CRM_Report.CountriesGrp_Id
            and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName)
    WHERE EXISTS (SELECT NULL
              from CRM_Report1 r1
                where r1.Location            = CRM_Report.Location
               and r1.CountriesGrp_Id       = CRM_Report.CountriesGrp_Id
               and r1.CountriesGrp_ShortName = CRM_Report.CountriesGrp_ShortName)        

  • 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.

  • Help needed in changing Access query to Oracle query

    hello folks,
    I have already posted this question and got some help previously but i have additional query being added to the previous one so thought of seeking some help.here it goes
    Am having an access report which comes from a query. the current query behind the report is a consolidated one and comes from quite a few tables . My requirement is to develop a crystal report( which comes with a native oracle db driver) which should look same as the access report. But am unable to use the access query becoz of its format or something. So anyone please throw some light on this. Any help would be kindly appreciated.
    SELECT Debtor . EVENT_ID,
    Debtor . MEDCAP#,
    Debtor . Client Name,
    Debtor . CLIENT,
    Debtor . Provider ID,
    Debtor . GROUPNUMBER,
    "OPEN" AS Status,
    (IIf(clip_file = "Y", "Clip", "Open")) AS clipStatus,
    IIf(collect_only = "Y", "Collection Only", "Regular Collections") AS Collect ?,
    IIf(IsNull(Principal), 0, principal,
    IIf(IsNull(PAR_FLAG), "N", IIf(PAR_FLAG <> "N", "P", PAR_FLAG)) AS PAR_NPAR_FLAG,
    Right(PatientMemberID, 2) AS Patient Suffix
    FROM Period, Debtor
    INNER JOIN LOB_subtypes ON Debtor . SUBTYPE = LOB_subtypes . SUBTYPE
    WHERE (((Debtor . CLIENT) = "CV1") And ((Period . PeriodName) Is Not Null) And
    ((Debtor . STATUS) = "OPEN") And ((LOB_subtypes . LOB) = "PBA"));
    Thanks

    The expression...
    IIf(IsNull(Principal), 0, principal) - IIf(IsNull(PRORATED_TRANAMT), 0, prorated_tranamt)...is equivalent to...
    NVL(PRINCIPAL, 0) - NVL(PRORATED_TRANAMT, 0)Does that answer your question?
    As for...
    IIf(IsNull(PAR_FLAG), "N", IIf(PAR_FLAG&lt;&gt;"N", "P", PAR_FLAG))...you might try...
    CASE
        WHEN PAR_FLAG IS NULL THEN 'N'
        WHEN PAR_FLAG != 'N' THEN 'P'
        ELSE 'N'
    END

  • Optimizing an SQL Query using Oracle SQL Developer

    Hi ,
    Currently i am using Oracle SQL Developer as my Database IDE .
    Is it possible to use Orqcles SQLDeveloper for the purpose of Optimizing an SQL Query ??
    For example assume i am having a query as :
    Select from Tranac_Master where CUST_STATAUS='Y' and JCC_REPORT='N'*
    Could anybody please tell me how can i use Oracle SQL Developer to optimize this query or any other SQL queries ??
    Please share your ideas , thanks in advance .

    1. Your query looks very simplistic as it is, so I fail to see how you can better optimise it (unless 'Tranac_Master' is a view, in which case I'd need to see the view details).
    2. No tool can automagically optimise your SQL to any degree of practical use. Very minor adjustments may be possible automatically, but really it is a question of you knowing your data & database design accurately, and then you applying your expert knowledge to tune it.

  • How to connect access database through oracle sql prompt

    i want to connect access database via oracle , i am trying to import all the data in Access table into oracle table how it is possible .
    A.R

    The simplest way, if You have already created tables in Oracle DB, is to open the Access MDB, link Oracle tables via ODBC and build a query to append rows reading from Access tables to Oracle tables.
    Hope this helps
    Max

  • How to convert Access query to Oracle?

    I am trying to convert this query into an Oracle 8i query: -
    SELECT *
    FROM EMPLOYEE
    LEFT JOIN ATTENDANCE ON EMPLOYEE.EMPID = ATTENDANCE.EMPID
    WHERE ATTENDANCE.COL1="#"
    AND ATTENDANCE.COL2>=#1/1/2007#
    AND ATTENDANCE.COL2<Now()
    GROUP BY EMPLOYEE.EMPID, EMPLOYEE.EMPNO;
    How do I put the above query in plain Oracle join operator (+) notation? Thanks for the help.

    Hi,
    Let us take a look at the solution you had suggested -
    EMPLOYEE.EMPID = ATTENDANCE.EMPID (+)
    AND ATTENDANCE.COL1="#"
    AND ATTENDANCE.COL2 >= TO_DATE ('1/1/2007','dd/mm/yyyy')
    AND ATTENDANCE.COL2< SYSDATE;
    Since we are outer joining ATTENDANCE but not using the (+) operator in the later filter conditions; it will still be a normal join i.e. it will not outer join on ATTENDANCE. That is my question.

  • 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?

  • Having trouble converting a MS Access IIF statement into SQL Sever 2012

    I am in the process of converting an Access Database to SQL Server 2012.
    The statement that works in MS Access currently right now is
     IIf([$$AMTP46 WITH LAST DRG]![LastOfMSDRG] Is Not Null,[$$AMTP46 WITH LAST DRG]![LastOfMSDRG],[$$AMTP46]![Billing DRG])
    I am not SQL Savvy, can you please help me find a solution to using this IIF statement in SQL. I have tried the CASE statements and no luck there either.
    Thanks

    I presume that you check if LastDRG column is not null then use LastDRG or else use LastOfMSDRG column
    You may also show your case query which didn't work for you.
    Meanwhile try below:
    -- Option 1
    SELECT CASE WHEN [LastOfMSDRG] IS NOT NULL
    THEN [LastOfMSDRG]
    ELSE [Billing DRG]
    END AS 'Output'
    FROM YourTable
    -- Option 2
    SELECT COALESCE([LastOfMSDRG], [Billing DRG])
    FROM YourTable
    -Vaibhav Chaudhari

  • MS Access 2010 and Oracle SQL Developer Version 4.0.3.16 Error

    OS: Windows 7 Enterprise
    System Type: 64-bit Operating System
    I can not get MS Access 2010 to work/open with SQL Developer version 4.0.3.16.
    ERROR when testing connection to MS Access 2010
    "Status : Failure -Test failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    I added the 32-bit ODBC data source for the MS Access I am trying to use with SQL Developer version 4.0.3.16 with the "C:\Windows\SysWOW64\odbcad32.exe" application, but I still get the same error.
    I appears that SQL Developer version 4.0.3.16.is looking at the 64-bit driver (ODBC Data Source) and I have no idea to direct SQL Developer version 4.0.3.16 to use the 32-bit driver (ODBC Data Source) when opening MS Access 2010.
    Thank you in advance for your advice.

    I downloaded the SQL Developer version 4.0.3.16 "sqldeveloper-4.0.3.16.84-x64.zip" that included the jre.
    How do I check which Java JDK I am running (32-bit versuns 64-bit)?
    In the command prompt I use "java -version" and I get this message "java is not recognized as an internal or external command"

  • Pivot Dynamic for Query in Oracle SQL DEVELOPER ??

    Hi
    I have the following question, someone who has a dynamic pivot.
    I need a dynamic query that is that when the transfer column to row do receiving any type declared as these can change data.
    Example:
    ID_PROJECT
    PROJECT STAGES
    DATE
    12345
    Requirement Analysis
    17-01-2013
    12345
    Quotation
    20-01-2013
    12345
    Project Preparation
    29-01-2013
    12345
    Model Verification
    04-02-2013
    12345
    Closed requirement
    10-02-2013
    23456
    Building and Unit Tests
    With dynamic pivot:
    ID_PROJECT
    Requirement Analysis
    Quotation
    Project Preparation
    Model Verification
    Closed requirement
    12345
    17-01-2013
    20-01-2013
    29-01-2013
    04-02-2013
    10-02-2013
    I mean that in this case the stages of the project will be changing.

    Hello,
    Do you want to do this in an SQL - Developer application-setting or by using any SQL / PLSQL block or both ?

Maybe you are looking for

  • Issue at PSA Level data

    Hi, I am trying to extract data from the 0CRM_COMPLAINTS_I into BI. I have to enhance this DS with two Z fields. I can clearly see data populated for these Z fields in RSA3 with the enhancement code. When I tried to get the same into BI, the data is

  • Can someone tell me please how to use the features...

    Hi all, Can someone tell me please how to use the features on the HS-47 headset? That is, what functions does the button control and how many presses of the button for each function, etc? The headset was as supplied with my 6200. I've tried looking f

  • Use of DateFormat function influences headers

    Can someone confirm/deny this, I must be going crazy.... In the attached code, I set the content type to text/xml. But when I visit the page in a browser it is resturned as text/html.. The header looks like this: quote: HTTP/1.1 200 OK Connection: cl

  • XP only sees my home folder structure and printers.

    I need to move files from XP to a second drive on my G5 tower, but I cannot seem to make it accessible to the XP machine. The second drive is my backup drive and has a folder called archive that has multiple levels of files within it. Can I open an e

  • Change enctype when submitting a form

    Hi, Can anyone please let me know if its possible to change the enctype when submitting a form. I am trying to change the enctype to "multipart/form-data" when upload is clicked, else i want it to be the default..... function OnSubmitForm(myform) ale