Oracle access sql syntax

Hi,
I am migrating access database to oracle 9i. Do you know of any changes to access sql syntax for it to use oracle backend?

Very general question. It of course depends on the SQL you use. They are not 100% compatibile. The workbench will create the necessary link tables on your behalf, but you may need to update the SQL in you Access application code. Also you might have to tune your access application to work better in a client/server mode, e.g. if you where doing a join of two tables you would want that to occur on the server not on the client. This depends how you interface/bypass the jet engine. These issues are common whether the backend is Oracle or SQL Server for that matter.
This should become obvious during your testing.
Donal

Similar Messages

  • Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax err

    I tried putting the square brackets and still get the same error. endasil suggested that the last value being inserted is not looking at the java code. I had earlier put +array. Now I replaced that with +a where a is a string representation of array elements. I still ahve a problem. How can I represent the array element in the query?
    String insertCommand = "INSERT into MetricOutput([A1],[A],[DRR],[DeRR],[RE],[WDRR],[WDeRR],[WRE],[ARF],[SRF],[HRF],[WARF],[WSRF],[WHRF],[SDC],[WSDC],[MAR],[WMAR],[H1],[H11],[H2],[H21],[Cluster]) "+
                             "VALUES("+comMappedCount+","+stdCount+","+DRR+","+DeRR+","+RE+","+WDRR+","+WDeRR+","+WRE+","+ARF+","+SRF+","+HRF+","+WARF+","+WSRF+","+WHRF+","+SDC+","+WSDC+","+MAR+","+WMAR+","+H1+","+H11+","+H2+","+H21+",+a)";

    It's quite hard to spot without code tags, but aren't you missing some quotes here:
    +",+a)"; instead of +","+a+")";I also don't know the Access sql syntax at all, but I am wondering if you don't need to surround all those arguments with single quotes. To avoid these kind of syntax errors in sql: use PreparedStatement. For more on this: http://java.sun.com/docs/books/tutorial/jdbc/basics/prepared.html

  • Oracle PL/SQL and Microsoft Access..

    Does anyone know of a good tutorial on how to write the correct syntax for Oracle PL/SQL in an Access pass-through query?

    Do you want to write PL/SQL via Access, or just pass a SQL string as a query? There are many books on PL/SQL if that is what you need, however, I suspect it is not.
    Oracle SQL is pretty standard, except that for versions up to and including 8.x, it only accepts joins listed in the "WHERE" clause. Access itself will accept this syntax for inner joins. Most general SQL books seem to include a section on Oracle and T-sql variations.
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y ;
    BUT if field_x is a CHAR field containing trailing spaces (CHAR(6) value is 'ABC ') and field_y is a VARCHAR2 field (value is 'ABC'), then the join condition should be:
    WHERE TRIM(a.field_x) = b.field_y ;
    for outer joins you add "(+)" to the field that may be blank
    SELECT a.field_1, b.field_2
    FROM table_1 a, table_2 b
    WHERE a.field_x = b.field_y(+) ;
    (Access) MID([field_1],2,5] becomes (Oracle) SUBSTR(field_1,2,5)
    regards

  • Entity Framework - Code First - Migration - How to access SQL Server and Oracle using the same context?

    Hello,
    I use Entity Framework code first approach.
    My project is working fine with SQL Server. But, I want to access Oracle too. I want to switch SQL Server and Oracle in run time.
    I am able to access Oracle using "Oracle.ManagedDataAccess.EntityFramework.dl" in a new project.
    But, Is this possible to access SQL Server and Oracle in the same project.
    Thanks,
    Murugan

    This should be possible with a Code-First workflow.  In Code-First the database mapping layer is generated at runtime.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Access SQL Function in Oracle?

    Microsoft Access SQL has a function called LastOf which extracts
    data from a column within the last row returned when multiple
    rows are returned. This function works even when many tables are
    joined and only one of them returns multiple rows. Does Oracle's
    SQL implementation have anything like it?

    I can't find a reference to a LastOf function for MS-Access.
    Perhaps you are refering to the Last(expr) function or MoveLast
    method of DAO Recordset.
    Last behavior can be reached in one of several ways depending on
    the desired results, most depending on the ordering of the result
    set. Both Access and VB use the concept of a recordset, which is
    analogous to a CURSOR in Oracle.
    To use an implicit cursor, and only retreive the one row, you
    might use the sudo-colomn ROWNUM:
    SELECT my_col FROM my_tab WHERE ROWNUM = 1
    This would give you the first record of the result set, but there
    is no guarantee on which row it would be - so you might consider
    ordering the result set:
    SELECT my_col FROM my_tab WHERE ROWNUM = 1 ORDER BY my_col ASC;
    Which would return one row, the value of my_col being the
    smallest value in the table. Now might be a good time to talk
    aggrogate functions, such as:
    SELECT MIN( my_col ) FROM my_tab;
    which does the same thing as above.
    If all else fails, RTFM.
    -Kevin

  • Accessing SQL Server from Oracle

    I found an article:
    http:www.databasejournal.com/features/oracle/article.php/3442661
    It shows how to setup a connection from Oracle to SQL Server.
    I am new to Oracle Using SQL Loader and PL/SQL.
    I would like to use the SQL Loader in Oracle to load a table in SQL Server. It is my understanding that a ctl file is used and is called by an Oracle application.
    I would not have an Oracle application. I would like to use the ctl file to load the SQL Server table. Can someone point me on how to use the ctl file for SQL Server?
    Also, in PL/SQL would there be a connection string to connect to SQL Server when accessing a table.
    Is there a book or some documentation that would address the above?
    Thanks in Advance.

    that article shows you how to access SQL Server database through Oracle, therefore you have no need to use SQL Loader to load data from SQL Server bcos it can be queried directly by using simple select statement.
    If you want to load the data into Oracle just use CREATE TABLE ... AS SELECT ...
    in PL/SQL, what you need is the database link.
    Cheers,
    NH

  • Migration Error from Access to Oracle through SQL Developer.

    Hi,
    Actually I am trying to migrate data from MS Access 2002 to Oracle 9i database through the SQL Developer. But Whenever I go to Capture Database from Access it will show me an error.... Invalid procedure Call and then it shows an error message... >>>>>>
    ShowSplashScreen("_OracleSplashScreen",3)
    after that i wont be able to do this task anymore..... So please help me get out of it... How Cam I Maigrate data from Access to Oracle 9i...
    Is any other tool i use or you can help me for this tool to migrate date...
    Please tell me..
    If yu can send me a mail then mail me on [email protected]
    regards,
    Vishal

    Hi Vishal,
    I have responded to your related thread on the Migration Workbench forum - Migration Error from Access to Oracle through SQL Developer.
    Regards,
    Hilary

  • Translating ms-access sql to oracle sql

    I would like to translate this ms-access sql to oracle sql.
    SELECT
    CStr(STUDENT_ID),
    FIRST_NAME,
    LAST_NAME,
    IIF(LEN(CLASS_CODE)=3,"Y","") AS "ELEMENTARY_SCHOOL",
    IIF(LEN(CLASS_CODE)=4,"Y","") AS "MIDDLE SCHOOL",
    FROM T_STUDENT
    Thanks in advance for your help.
    Sandra

    For an equivalent of IIF, look at CASE or DECODE. For LEN use LENGTH.
    A business rule that says elementary and middle schools can always be identifed by the length of their codes sounds rather unreliable, though.

  • Access SQL-Server Data from Oracle 10gXE

    Hello,
    I want to access sql-server data from oracle 10g XE. I need the same functionality provided by Sql-server by Linked Servers, by which we can query on any data source(oracle, Excel, Access).
    do, Oracle 10gXE provide us with same functionality ???
    any pointers ???

    Yes, it does work with Express Edition.
    Here is a thread from the XE forum with examples.
    Re: Database Link to MS Access
    They refer to a MS Access database, but the procedure is the same.
    Doug

  • Using Oracle Heterogenous services to access sql server database table

    I have created a dblink 'POC_HS' from oracle to sql (implemented heterogeneous services) and I am able to successfully pull out data from the default database that the DSN(for sql server) is connected to.
    So this 'select * from Test@POC_HS' is working perfectly fine on the Oracle database as 'Test' table resides in the default database (which the System DSN is connected to).
    But when I do 'select * Abc.Test@POC_HS' where Test table resides in 'ABC' database which is not the default database throws an error as follows:
    ORA-00942: table or view does not exist [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Abc.Test'.[Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be prepared. (SQL State: S0002; SQL Code: 208)
    I have also tried this 'select * from Abc.dbo.Test@POC_HS' but oracle throws this exception "ORA-00933: SQL command not properly ended".
    The dblink user and System DSN account has access to the 'Abc' database.
    Thoughts?

    Thanks for the info.
    But suppose if we have DB link 'POC_HS' where POC_HS is a DBlink between oracle servers, I can do the following -
    1. select * Abc.Test@POC_HS
    2. select * Def.Test@POC_HS
    where Abc,Def are the schemas which the Dblink user has access to. I can execute the above perfectly fine.
    I wanted the achieve the same functionality from Oracle to Sql where database keep on changing dynamically . So according to you that's not possible right?
    We will have to keep on changing the ODBC connection to a different database or create a new odbc/listener/tnsentry each time query uses a different database right?
    Edited by: 878753 on Aug 11, 2011 1:29 AM

  • Wow, DB2 for LUW 9.5 copycatted almost all the Oracle SQL syntax even inclu

    A list of the add-ins per my memory:
    1) DUAL;
    2) NVL()
    3) DECODE()
    4) START WITH/CONNECT BY PRIOR/sudo column LEVEL for tree structure SQL that prior DB2 9.5 could not do it in SQL while Oracle does it by just one simple SQL
    5)(+) for outer join
    6)TO_CHAR()/TO_DATE()/...
    7)LPAD/RPAD that might be added in DB2 9 if I did not remember wrong
    8)Drop a cloumn from a table
    I worry that IBM may get law suit by Oracle?

    I actually take it in a light way. I just wonder how
    come DB2/UDB 9.5 going so far that it even offers the
    outer join operator (+) which is I believe Oracle's
    unique syntax. It's not in any standard, right?
    Let' just say they want Oracle's business badly not vise versa .
    Some of the features you listed that are 'better' than Oracle are questionable
    >
    1) The way to handle LOB objects that Oracle needs to
    the built-in package while DB2 just uses regular SQL
    which impressed me a lot.You can imagine the LOB object can be handled by regular SQL is not so Large. What kind of operations you want to use regular SQL to handle anyway? select, update, insert?
    2) VALUES()
    It can hold consecutive row and columns for inserting
    and function as SELECT...INTO too.Not sure exactly what this mean, an example will be nice.
    3) OLD/NEW/FINAL TABLE();
    e.g., select ... from OLD TABLE (DELETE FROM ...)
    select ... from NEW/FINAL (INSERT INTO ... or
    UPDATE ... INCLUDE...SET...)Same as above
    4) INCLUDE keyword in UPDATE statementSame
    5)CASE does offer more comparing than DECODE()Might need some approve
    6) The empty string '' which is not NULLDon't Oracle have it the same way?
    .........

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

  • JDBC to access SQL server 2000 and Oracle.

    hi,
    I have the following requirement. I have an oracle database which contain sql data including BLOB and CLOB. Firstly, I should migrate the data to a SQL server 2000 database. That is, i should be able to have two databases, one on oracle and the other on sql server 2000. the two databases should contain the same data, which includes BLOB data. I guess, sql server 2000 does not have a BLOB data type. What is the equivalent data type i can use to save the Oracle's BLOB data in SQL server?? Should it be image type?
    After i migrate the data to the sql server 2000 database, i should be able to connect to the two databases, oracle and sql server 2000, using the same JDBC code to retrieve, insert, update and delete the data. What are the drivers that i should use. I guess, the MS JDBC driver does not support BLOB and CLOB. Is there a driver that can support BLOB for sql server 2000 and is also free???!
    Kindly help... Thanks.
    Arthi.

    Hi,
    I am new to jdbc... so, pls forgive my ignorance...
    I shall try to map a BLOB data column in oracle to an IMAGE data column in sql server 2000. I am using oracle jdbc driver and microsoft's jdbc driver for connecting to the databases.
    My question is, can i use setBlob() method in the preparedstatement in jdbc code for setting data to the sql server 2000 image column?
    rs.getBlob() and preparedstatement.setBlob()code works fine for oralce's BLOB column using oracle's jdbc driver.... Will the same jdbc code work for sql server 2000's image column using microsoft's jdbc driver??
    Kindly help.
    Arthi.

  • Connecting and Accessing Oracle with SQL Server

    In Oracle and SQL Servers I'm Updating the data manually. But I want make it Automated Process(Updating required columns automatically) in SQL Server by using trigger during manual update in Oracle's table with respect to column .
    Is this possible?
    Im using Oracle 11g in linux and SQL Server 2005 in windows.
    Both Servers are in different locations , but are in same network and not connected with ODBC , dblink .
    I need your Valuable assitance and Helpful guide for succesfully completing my task.
    Useful Replies are Highly Appreciated.

    Hi,
    Yes, you can update SQL*Server tables from Oracle using triggers if you install and use the Database Gateway for SQL*Server (DG4MSQL). You need to use DG4MSQL because it supports distributed transactions so that the Oracle and SQL*Server commits can be synchronised and both will be rolled back if there is an error.
    You could use the Database Gateway for ODBC (DG4ODBC) but you would have to write your own error routines to handle problems if the commits fail in either Oracle or SQL*Server.
    There is more information about the gateways in this note available in My Oracle Support -
    Master Note for Oracle Gateway Products (Doc ID 1083703.1)
    Regards,
    Mike

  • [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.

    Hi,
    I am getting following error message ,
    [Microsoft][ODBC Microsoft Access Driver] Syntax error in UPDATE statement.
    When run this code.
    <%@ page import= "java.sql.*"%>
    <%
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    Statement st = con.createStatement();
    st.executeUpdate("update tscipshift set 11-Aug-08='M' where TechN='Elamparuthi'");
    %>
    tscipshift=table ,column=11-Aug-08 are all exist.
    I dont know why I am getting error mesage.
    Any idea why?

    Shahbaz2008 wrote:
    you haven't set your user name and password hereI don't believe that's necessary with Access. Then again, it's not an enterprise database.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb");
    change it to this
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","+username+","+password+");
    here pass your username and password...
    In Oracle default user name and password is
    username = scott
    password = tigerSo who uses that? Only an eejit would leave that account open.
    So the statement would be
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","scott","tiger");
    or In Mirosoft Access there is no user name and password so the statement will be Like I said - unnecessary, and not the reason the OP is having problems.
    Connection con = DriverManager.getConnection("jdbc:odbc:bspipdb","","");>
    Besides this change your table name 11-Aug-08 to anything that is not start with number or any special symbols.
    for example aug112008 is good or aug is too good.No, it's still not good if you understand ANYTHING about relational databases and normalization.
    I think it would work.I think you're just as stup!d as the OP.
    %

Maybe you are looking for