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.

Similar Messages

  • 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

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

  • How to run a MS Access Query from Servlet

    Is there a way to execute an MS Access query from a servlet. I have a query that is doing an INSERT into the database. I tried to code the servlet to directly do the query itself, but it keeps locking the database and hanging. I would appreciate any help.
    Thanks,
    Justin
    [email protected]

    r u refering to the query saved inthe MSACCESS, if so then it may not be possible, bcoz it is not a pure RDBMS. otherwise the u can do it as inthe above mention thread.

  • Email access query from powershell

    I am trying to utilise the DoCmd.SendObject command, from powershell... I have the script launch the required database but I cannot get it to export the query information into Xl format and email it...
    This ran the macro that I had produced in Access but I was then required to manually click on an Outlook warning box so it has not resolved the issues.
    I just need to get this query data out of access either to save it locally and then send it via email or send it automatically...
    Does anyone have any experience of this?
    Your help will be most appreciated!
    Regards
    Richard

    Hi Richard,
    If you want to export the access query to excel format and send the excel report, have you tried the
    DoCmd.OutputTo
    Method, please also note I haven't tested
    $db = New-Object -ComObject Access.Application
    $db.OpenCurrentDatabase("foo.accdb")
    $db.DoCmd.OutputTo(1,"The_Report","YourQueryName", "Excel Workbook (*.xlsx)", , True)
    Refer to:
    Powershell Interaction with Access 2007, how to Save Report as PDF?
    DoCmd.OutputTo in xlsx (Excel 2007+) Format
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • Help with Converting an Access query

    Hello:
    First time poster and would appreciate some help in converting this Access query into T-SQL so I can use in a Stored Procedure. I don't need help in resolving the syntax for the variables as parameter in the second query, but stuck in writing the first query
    in T-SQL . I assume I need some type of nested query with a left join to another query in T-SQL. 
    How do I convert this from Access into MS-SQL
    SELECT TBL_MONTH.L_Month, TBL_MONTH.L_MonthName
    FROM TBL_MONTH LEFT JOIN qry_MonthCheck ON TBL_MONTH.L_Month = qry_MonthCheck.L_Month
    WHERE (((qry_MonthCheck.L_Month) Is Null));
    qryMonthCheck in Access is defined as
    SELECT TBL_MONTH.L_Month, TBL_SIGNOFF.SO_YEAR, TBL_SIGNOFF.SO_USER, TBL_SIGNOFF.SO_LOCATION
    FROM TBL_MONTH RIGHT JOIN TBL_SIGNOFF ON TBL_MONTH.L_Month = TBL_SIGNOFF.SO_MONTH
    WHERE (((TBL_SIGNOFF.SO_YEAR)=[forms]![frm_signoff]![cboyear]) AND ((TBL_SIGNOFF.SO_LOCATION)=[Tempvars]![tmpVarUserLOC]));

    It is very much up to personal taste. For tables I use no prefix at all. Or suffix. I prefer plural: categories, products, etc. For junction tables, I drop the plural in the first entity, for instance productcategories. As for the case, many people prefer
    initial uppercase, while I go for lowercase only. But initial uppercase has its points, particularly in documentation. I am a staunch advocate of using case-sensitive collation for metadata. I don't see any point in mixing productcategories, Productcategories,
    ProductCategories etc. That can only cause confusion.
    As for either entities, I don't use views much, and I don't have any prefix for these either. In fact, several views I've been involved used to be tables once upon a time.
    If you want to add a marker to the object name, I recommend using a suffix. It is much easier to find objects in the version control system and other browser, when not everything is cluttered on the same letter. For instance, I typically add _sp at the end
    of stored procedure names.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • How changing the criterion for an access query in java?

    Hi @ all
    I would like to change a criterion for an access-query in java. I know how to run a access-query in java. How can I change the criterion in my access query in java without running the query it selfs? Can anybody help me?
    Thx
    Dario

    I would like to change a criterion for an
    access-query in java. I know how to run a
    access-query in java. How can I change the criterion
    in my access query in java without running the query
    it selfs? Can anybody help me?
    You can't.
    The database processes the query and then returns the result to you. Thus to change the query you must run the query again.
    You can of course add code do do the same thing. But unless it is very simple it is going to take a lot of code and might even be slower than doing the database call.

  • How can Javascript in BW web template access query data

    Hi All,
    I want to access the BW query data from within Javascript within the BW Web template. Can you kindly share ideas how I can make my Javascript reach the query results returned by the dataprovider query in the BW template.
    Your help is highly appreciated.
    Thanks
    Karen

    Hi
    The question is not using BW queries in Web templates I use them all the time. Within a BW web template I have Java script I want to access the BW query data from Javascript. The question is how to access query data within JavaScript.
    Regards
    Karen

  • Random results with  random access query

    Hi,
    when I execute a random access query
    (fetchConfig.setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
    fetchConfig.setFetchDirection(ResultSet.FETCH_UNKNOWN)) and iterate over the
    result set twice, the second time the objects are retrieved in a different
    order, also when I set the ordering of the objects. This only happens if the
    first loop touches the last item. If not, everything works fine. I am using
    MS Sql Server, microsoft driver, kodo 3.4
    regards,
    Christiaan

    Hi,
    I am using datastore identity. I do implement equals and hashcode in the
    super class, not sure whether that is of any impact. The order of the items
    look random to me, however it stays constant after the second loop. The same
    order is also produced when I re-start the test application. The output
    shows the index of the object I am retrieving, the description of the object
    (which is also the order in which the items are created) and their order
    attribute. The query sorts on the order attribute. As you can see the first
    loop is correct. I now and then have the situation where the last item in
    the first loop (retrieve 7) results in the first item (item nr 0) being
    retrieved. Same behaviour applies for both jtds and microsoft driver.
    first loop:
    retrieve 0: item nr: 0 order: 0
    retrieve 1: item nr: 1 order: 1
    retrieve 2: item nr: 2 order: 2
    retrieve 3: item nr: 3 order: 3
    retrieve 4: item nr: 4 order: 4
    retrieve 5: item nr: 5 order: 5
    retrieve 6: item nr: 6 order: 6
    retrieve 7: item nr: 7 order: 7
    second loop
    retrieve 0: item nr: 3 order: 3
    retrieve 1: item nr: 6 order: 6
    retrieve 2: item nr: 7 order: 7
    retrieve 3: item nr: 0 order: 0
    retrieve 4: item nr: 5 order: 5
    retrieve 5: item nr: 4 order: 4
    retrieve 6: item nr: 2 order: 2
    retrieve 7: item nr: 1 order: 1
    third loop
    retrieve 0: item nr: 3 order: 3
    retrieve 1: item nr: 6 order: 6
    retrieve 2: item nr: 7 order: 7
    retrieve 3: item nr: 0 order: 0
    retrieve 4: item nr: 5 order: 5
    retrieve 5: item nr: 4 order: 4
    retrieve 6: item nr: 2 order: 2
    retrieve 7: item nr: 1 order: 1
    "Marc Prud'hommeaux" <[email protected]> wrote in message
    news:[email protected]...
    Christiaan-
    My first guess is are you using application identity, and if so, are you
    correctly implementing the equals() and hashCode() method? Failure to do
    so may conceivably cause this problem.
    Otherwise, can you provide some details about how the results are our of
    order? It it exactly reverse or something, or are elements in random
    order?
    Christiaan wrote:
    Hi,
    when I execute a random access query
    (fetchConfig.setResultSetType(ResultSet.TYPE_SCROLL_INSENSITIVE);
    fetchConfig.setFetchDirection(ResultSet.FETCH_UNKNOWN)) and iterate over
    the result set twice, the second time the objects are retrieved in a
    different order, also when I set the ordering of the objects. This only
    happens if the first loop touches the last item. If not, everything works
    fine. I am using MS Sql Server, microsoft driver, kodo 3.4
    regards,
    Christiaan
    Marc Prud'hommeaux
    SolarMetric Inc.

  • SSMS Addin - How To Access Query Results Grid

    Hi,
    I want to access Query Result Grid(Results) in SSMS addin but I did'nt found anything.
    How can I access Query Result Grid, Rows, Columns and Cells when I executed a script?
    Thanks.

    SQL Server Management Studio currently supports query execution results to be displayed in three different ways: Results to Grid,
    Results to Text and Results to File.
    By default SQL Server Management Studio is configured to display query results in
    Grid format.  If you want to change the default to some other option follow these steps.
    1. In SQL Server Management Studio, under Tools menu, click
    Options as shown in the snippet below.
    2. In the Options dialog box, expand Query Results, expand
    SQL Server and then select General as shown in the snippet below. In the right side panel choose one of the three options shown below in the
    Default Destination for results drop down list and click
    OK to save the changes as shown in the snippet below. The changes will go into effect once you open a New Query window.
    Query Result Options for Results to Text
    In this format you have the option to display the results in a different tab as well as setting different output options.
    In the Options dialog box, expand Query Results, expand
    SQL Server and then select Results to Text tab as shown in the snippet below. In the right side panel first select the checkbox for
    Display results in a separate tab and then select the checkbox for
    Switch to results tab after the query executes and then click
    OK. If you would like to also display the column name in the result set then choose the option Include column headers in the result set
    as shown in the snippet below.
    The options you can use in the Text format are:
    Output format: - In the above snippet you could see that by default the output is displayed as columns aligned. Some of the other options that are available are Comma Delimited,
    Tab Delimited, Space Delimited and Custom Delimited. If you choose the Custom Delimited option in the Output format drop down list then you need to specify a character of your choice for the delimiter in the
    Custom delimiter text box.
    Include column headers when copying or saving the results: - If this option is selected, then whenever the results are copied to clipboard or it is saved to a file the column headers are also copied along with the results.
    Include the query in the result set: - The text of the query is displayed as part of query output under the messages tab.
    Scroll as results are received: - If this option is selected, then the display focuses on the most recently returned records at the end of the results set.
    Right align numeric values: - If this option is selected, then numeric values will be aligned to the right of the column.
    Discard results after query executes: - If this option is selected, then the query results are not displayed in the reviewing pane.
    Display results in a separate tab: - If this option is selected, then the result set after query execution will be displayed in a new tab instead of at the bottom of the query window.
    Switch to results tab after the query executes: - If this option is selected, then after the query execution the screen focus will be set to the results tab.
    Maximum number of characters displayed in each column: - This sets the maximum characters to display for any one column.  So if you have a column that is 500 characters this will only show the first 256 if you keep the default setting.
    Ref link :http://www.mssqltips.com/sqlservertip/2346/different-options-for-query-results-in-sql-server-management-studio/
    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

  • 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

  • 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

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

  • Access to linux oracle migration

    Hi. I have a huge access application and database that I am
    trying to migrate from access to the linux version of oracle 8.
    I have the access application and database in seperate mdb files.
    Is there a way I can convert this db to oracle 8 for linux and
    preserve all the rules in my database. Also what will happen to
    any of my queries that use directsql. Thank you very much.
    Birju Shah
    null

    hi Birju,
    You can download the MS Access conversion kit from this web site
    and this will migrate application and database to Oracle on any
    supported platform (including Linux).
    Log onto http://technet.oracle.com
    Go to Technologies
    Go to Migration technologies
    Go to Migration Toolkits
    and pick the MS Access kit for Oracle 8.1.5
    We hope to have a plugin that will allow users to migrate from
    Access to Oracle8i (on any supported platform) in the very near
    future. This plugin will work with the Oracle Migration
    Workbench.
    Regards
    John
    Birju (guest) wrote:
    : Hi. I have a huge access application and database that I am
    : trying to migrate from access to the linux version of oracle
    8.
    : I have the access application and database in seperate mdb
    files.
    : Is there a way I can convert this db to oracle 8 for linux and
    : preserve all the rules in my database. Also what will happen
    to
    : any of my queries that use directsql. Thank you very much.
    : Birju Shah
    Oracle Technology Network
    http://technet.oracle.com
    null

Maybe you are looking for