Issue sourcing from Microsoft Access - Syntax error (missing operator)

I apologize if this has been discussed before. I used the search and went through 7 pages of results, but didn't see a similar issue.
I'm using Windows 7, ODI 11.1.1.5.
I'm trying to source from a local MS Access DB to an Oracle DB.
The session fails pretty much immediately (on step 3) - trying to pull data from the source table.
"Syntax error (missing operator) in query expression"
The source table is very simple and for this test I'm using no joins. Literally a 'select * from'.
However - when I look at the SQL generated - it's wrong. It's got duplicate lines in the SQL and not all columns selected have a comma after and before the next column.
If I run it direct on Access - I get the same error.
If I clean up the SQL - it'll run fine on Access.
I'm using the SQL to Oracle LKM.
I wondered if it was something with the ODBC driver - so I've tried other versions of ODBC drivers for MS Access, and even switched the database itself from the Office 2007 format, back to 2003, and tried a driver for that.
Same result.
If I go to the model and right click and look for the data in the table - it displays fine. So obviously ODI can connect and see the data...
So I guess my questions are:
- is the SQL to Oracle LKM the correct one to source from Access ? I've even gone into it and specified MS Access as the source. Same result.
- if it is the right one - what's going on ?? I've got to assume other people are pulling data from MS Access. Why the garbage SQL ? Clearly I'm missing something.
- and finally - worst case - but is there a way for me to overwrite the SQL being generated so I can correct it myself. This will be a PITA since I'll be source from a bunch of tables - but at least it might be a temporary stop gap...
thanks

I'm going to mark this as closed for now. I solved the SQL issue. It was to do with the way the tables / fields were named and how the fields were being brought into the workflow. Tidying up there fixed the problem.
Getting past that brought me to several other issues which I'm still working through. The current is an Invalid Fetch size error - but that appears to have been resolved in patch Doc ID: 13528165 in ODI 11g (ver 11.1.1.5.0)
given the initial issue that I'd raised is no longer a concern - I'm closing.
Edited by: 940843 on Jun 15, 2012 1:27 PM

Similar Messages

  • [ODBC Microsoft Access Driver] Syntax error (missing operator)

    Aello' - as you can see in my database table their are two
    records to delete based on the HISTORY_ID of 1. This was working
    just fine when I was using a MS SQL Server database but when I
    switched to the MS Access database I get this error now.
    Is their a syntax difference?

    mikeap wrote:
    > Attached code. Clearly their are records to delete, what
    am I missing?
    >
    > Using MS Access database.
    >
    > [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft
    > Access Driver] Syntax error (missing operator) in query
    expression
    > 'R_PROJECT_MEDIA WHERE Media_ID IN (1)'.
    >
    > <cfquery datasource="tbar">
    > DELETE R_HISTORY_MEDIA
    > WHERE History_ID IN (#FORM.pHistory#)
    > </cfquery>
    DELETE
    FROM R_HISTORY_MEDIA
    WHERE History_ID IN (#FORM.pHistory#)
    Jochem
    Jochem van Dieten
    Adobe Community Expert for ColdFusion

  • "java ODBC Microsoft Access Driver Syntax error (missing operator) in query

    Hi I am new to java and I am getting this error message when using java to access and insert data into an MS Access database.
    "java ODBC Microsoft Access Driver Syntax error (missing operator) in query expression"
    The commands are
    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+",+array)";

    "VALUES("+comMappedCount+","+stdCount+","+DRR+","+DeRR+","+RE+","+WDRR+","+WDeRR+","+WRE+","+ARF+","+SRF+","+HRF+","+WARF+","+WSRF+","+WHRF+","+SDC+","+WSDC+","+MAR+","+WMAR+","+H1+","+H11+","+H2+","+H21+",+array)";After looking at your post in the editor, I see what your real query looks like.  You realize that ",+array[i])" is part of the query, right?  And not actually looking at your Java array?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Syntax error (missing operator) in query expression

    Hi all
    I am creating a couple of pages where a dynamic list is created from an access database and then products from that list are displayed, the user then has the option of clicking more details, this then should pass the KITID over to the details page, However when i click on the details page i get the following error
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
    [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'KitID = Kit 01'.
    /classicclocks/Kieninger_gallery.asp, line 21
    Here is the code from the page i am building, can anybody see anything obvious here
    strKitID = Request.QueryString("KitID")
    ' If KitID does not exist then redirect to Gallery page
    If strKitID = False Then
      Response.Redirect("kit_gallerytest.asp")
    End If
    ' SQL Query for specific KitID details only
    Dim objRS
    Set objRS = Server.CreateObject ("ADODB.Recordset")
    ' Open new objRS
      strSQL = "SELECT KitID,ImgKitCatalogue,KitDescriptionShort FROM tblMovements WHERE KitID = " & strKitID & " ORDER BY KitID"
      objRS.Open strSQL, MM_dbConn_STRING,,,adCmdTable
      ' Get all rows from table and asign values to array for use in form
      Do While Not(objRS.EOF)
      Images = True
      fsImagesArray = objRS.GetRows()
        Const arrKitID = 0
        Const arrImgKitCatalogue = 1
        Const arrKitDescriptionShort = 2
      Loop
    ' Close objConn and objRS
    objRS.Close
    strSQL = "SELECT * From tblMovements WHERE KitID = " & strKitID
    objRS.Open strSQL, MM_dbConn_STRING
    thanks
    John

    String values in a SQL where clause must be wrapped in quotes. Try this:
    strSQL = "SELECT KitID,ImgKitCatalogue,KitDescriptionShort FROM tblMovements WHERE KitID = '" & strKitID & "' ORDER BY KitID"

  • Syntax error (missing operator) in query expression works in sql

    Hi guys,
    I am having a problem with this query in Access 2007, it runs
    fine in MSSQL.
    I get this error when I run it.
    [Macromedia][SequeLink JDBC Driver][ODBC
    Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error
    (missing operator) in query expression
    'tbl_skuoption_rel.optn_rel_Option_ID = tbl_skuoptions.option_ID
    INNER JOIN tbl_skus ON tbl_skuoption_rel.optn_rel_SKU_ID =
    tbl_skus.SKU_ID INNER JOIN tbl_products AS p ON
    tbl_skus.SKU_ProductID = p.product_ID'.

    Access may require parenthesis ( ) around the JOINs when
    joining more than two tables

  • Help! This is driving me crazy. CASE statement report syntax error (missing operator)

    Hi
    Can anyone help with this SQL statement please. It uses a
    CASE statement but I keep getting back a syntax error (missing
    operator) error message. The SQL statement works without the CASE
    statement, so everything else is fine - its just when I put the
    CASE statement back in.
    Here's the SQL statement:-
    SELECT transactions.ourRef, transactions.transDate, CASE WHEN
    transactions.transTypeID = 2 THEN transactionDetails.goodsVatable *
    -1 ELSE transactionDetails.goodsVatable END,
    transactionDetails.goodsNonVat, transactionDetails.VAT,
    transactionDetails.grandTotal, clients.clientCode,
    transTypes.transTypeDesc
    FROM transactions, transactionDetails, clients, transTypes
    WHERE transactions.transID = transactionDetails.transID
    AND transactions.clientID = clients.clientID
    AND transactions.transTypeID = transTypes.transTypeID
    TransID = 2 means that its a credit not instead of an
    invoice, therefore I want the goods vatable returned as a negative
    number.
    Thanks in advance.
    Wez

    quote:
    ...the client wishes for me to use an MS Access db
    Too bad you didn't say that to begin with. I believe that
    with Access you might consider using IIF().
    Syntax:
    IIf(expr, truepart, falsepart)
    SELECT transactions.ourRef,
    transactions.transDate,
    IIf(transactions.transTypeID = 2,
    transactionDetails.goodsVatable * -1,
    transactionDetails.goodsVatable),
    transactionDetails.goodsNonVat,
    transactionDetails.VAT,
    transactionDetails.grandTotal,
    clients.clientCode,
    transTypes.transTypeDesc
    FROM transactions, transactionDetails, clients, transTypes
    WHERE transactions.transID = transactionDetails.transID
    AND transactions.clientID = clients.clientID
    AND transactions.transTypeID = transTypes.transTypeID
    Phil

  • How to solve System.Data.OleDbException (0x80040E14): Syntax error (missing operator) in query expression..

    The codes are..
     Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
            conn.ConnectionString = connstring
            If conn.State = ConnectionState.Closed Then
                conn.Open()
            Else
                MsgBox("Close")
            End If
            If (String.IsNullOrWhiteSpace(TextBox1.Text)) Then
                MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
            ElseIf (String.IsNullOrWhiteSpace(TextBox2.Text)) Then
                MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
            ElseIf (String.IsNullOrWhiteSpace(RichTextBox1.Text)) Then
                MessageBox.Show("PLEASE FILL IN ALL THE BOXES")
            End If
            Try
                Dim SqlQuery As String = "INSERT INTO Research (Title,Abstract,Proponents,Ryear) VALUES ('" & TextBox1.Text & "', '" & RichTextBox1.Text & "', '"
    & TextBox2.Text & "', '" & DateTimePicker1.Text & "')"
                Dim SqlCommand As New OleDbCommand
                With SqlCommand
                    .CommandText = SqlQuery
                    .Connection = conn
                    .ExecuteNonQuery()
                End With
                MsgBox("One record Succesfully Added")
            Catch ex As Exception
                MsgBox(ex.ToString)
            End Try
            Me.Close()
            main.Show()
        End Sub
    The situation is, I cannot add data if it is copied from the text from the ms word and paste it to the RichTextbox in my project..I can only add if I type Manually the data the richtextbox..If I copy paste it..this error comes out.
    Please help me to solve this problem..i attached the image of the error

    Windows Form forums are here.
    http://social.msdn.microsoft.com/Forums/windows/en-US/home?category=windowsforms
    or ASP.Net forums are over here.
    http://forums.asp.net/
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Data from Microsoft Access ?

    Hi,
    When I deploy report that takes data from Microsoft Access, I got error: Unable to retreive object.
    How do we set the data source for this ? I tried to put the MS access file in the same folder as the published rpt file, it didn't work.
    Thanks

    There are a couple of issues here for you to look at.
    1.  How are you connecting to the database from your development machine?  If you're using an ODBC connection, that same connection must be set up on the computer where the report is deployed.  Where you're using ODBC or another connection method, your deployement computer will also need to have installed whatever drivers are necessary for connecting to Access (they aren't installed by default with Windows!)
    2.  If the database resides on the network (I know, you said it was in the same folder as the report, but you may not always be able to do that!) the user who is logged in to the machine where your app is deployed will have to have valid network access to the folder where the database is located.
    -Dell
    - A computer only does what you told it to, not what you <em>thought</em> you told it to!

  • Created PDF from MS Access - lines are missing from PDF

    I'm using Acrobat 8 (from Adobe CS3) to create PDF files.  When I "print" reports from Microsoft Access 2003, the thin line borders that outline cells are often missing from the PDF. Typically, 1 or 2 of the sides are missing, with the other sides appearing normally.
    This appears to happen primarily when the line thickness is set to "hairline".
    If I use a non-Adobe PDF writer (PDF Creator), then the lines appear normally.
    Any suggestions about what I can do to correct this?
    Thanks - Jim

    These are the settings.

  • Getting image from Microsoft Access database to display in browser

    Hey! anybody please help me
    I've been trying with no success to get an image from a microsoft access database
    so far this is what i have:
    package Servlets;
    import java.io.*;
    import java.net.*;
    import utils.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class serv extends HttpServlet {
        java.sql.ResultSet rs=null;
        ClsConexion conexion=new ClsConexion("Nedermex");
        protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            conexion.conectate("1", "1");
            rs=conexion.obtenRegSelect("SELECT * FROM Flores WHERE ID=1");
            try{
                rs.next();
                System.out.println("sadfsadf " + rs.getString("ID"));
            }catch(Exception e){
                e.printStackTrace();
            String ubicGIF = request.getParameter("ubicGIF");
            if((ubicGIF==null) || ubicGIF.length() == 0 ){
                indicarError(response, "Archivo de imagen no establecido");
                return;
            //String archivo = getServletContext().getRealPath(ubicGIF);
            try{
                if(rs.next()){
                    System.out.println("sadfsadf " + rs.getString("ID"));
                    BufferedInputStream ingreso = new BufferedInputStream(rs.getBinaryStream("Imagen"));
                   // BufferedInputStream ingreso = new BufferedInputStream(new FileInputStream(getServletContext().getRealPath("1.jpg")));
                    ByteArrayOutputStream flujoBytes = new ByteArrayOutputStream(512);
                    int byteImagen;
                    while ((byteImagen= ingreso.read()) != -1){
                        flujoBytes.write(byteImagen);
                    ingreso.close();
                    String indiPersistencia = request.getParameter("usePersistence");
                    boolean usePersistence = ((indiPersistencia == null) || (!indiPersistencia.equals("no")));
                    response.setContentType("image/jpeg");
                    if(usePersistence){
                        response.setContentLength(flujoBytes.size());
                    flujoBytes.writeTo(response.getOutputStream());
            }catch(IOException ioe){
                indicarError(response, "Error: " + ioe);
            }catch(java.sql.SQLException sqle){
                indicarError(response, "Error: " + sqle);
        public void indicarError(HttpServletResponse response, String mensaje) throws IOException {
            response.sendError(response.SC_NOT_FOUND, mensaje);
        // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
        /** Handles the HTTP <code>GET</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doGet(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Handles the HTTP <code>POST</code> method.
         * @param request servlet request
         * @param response servlet response
        protected void doPost(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            processRequest(request, response);
        /** Returns a short description of the servlet.
        public String getServletInfo() {
            return "Short description";
        // </editor-fold>
    }i have a class Conexion wich controls the connection and resultsets
    As you can see, i tested accessing a jpeg file: 1.jpg with FileInputStream, and it works perfectly, but when i try to get an image from Microsoft Access using the resultset the way i did, the browser shows the following message
    The image �http://localhost:8084/Nedermex/serv� cannot be displayed, because it contains errors.
    My table in the database in Access is configured as following
    FieldName::::::::::::::DataType
    ID::::::::::::::::::::::::::::::Number
    Imagen::::::::::::::::::::OLE Object
    Now, when i insert an image in the Imagen field, i select the option "Create from file" and select the jpg file (the one that worked with the FileInputStream) and uncheck the Link option (to save the data in the db
    maybe there is something wrong with the sizes or something....
    please help me here!!!
    thank you!

    Yes it is an sql question
    Consider this as my condition need to fetch records collected in database on 16-4-2012 
    Table name =TEST_REPORT
    i have passed the following query
    Select Serial_Number,System_Date,System_Time,Department,O​perator_Name,Serial_Number,Test_Case,Pass_Fail from TEST_REPORT  where System_Date = 4-16-2012, it displays the entire record from database. i have my vi along with this mail.
    Attachments:
    Report Viewer.vi ‏24 KB

  • I want to convert date from Microsoft Access to Oracle.

    I want to convert date from Microsoft Access to Oracle.
    My Oracel date format is 21-Jul-2004 02:24:09 AM
    I use sqlldr in Oracle 9i Database and I
    write control file
    load data
    infile 'test.txt'
    into table test
    fields terminated by "," optionally enclosed by '"'
    trailing nullcols
    name,
    birthday
    data file 'test.txt' for input
    "dao","21-Jul-2004 02:24:09 AM"
    why did error? ORA-01843: not a valid month
    Thank.

    replace birthday with
    birthday "to_date(:birthday, 'DD-Mon-YYYY HH:MI:SS AM', 'NLS_LANGUAGE=''american''')"Of course, if your monthes are in German, then set the language to german (JUL=JUL but DEZ<>DEC)
    Regards
    Laurent

  • Trying to Import data from Microsoft Access in POWERPIVOT

    Hello,
    I am trying to import data from Microsoft Access into Powerpivot. In my Access database I have several query's.
    When I go to the Table Import Wizard in powerpivot, I only see one source table. Why can't I see the other query's?
    Thanks in advance for your help.
    Soraya

    Hello Soraya,
    Which Version of MS Excel / Power Pivot are you using? Do you try to Import from a MDB or from the new Format ACCDB? Are these common queries in MS Access or pass-through queries?
    In common it should work, if I Import from a MDB I can see & select both, tables & views (queries):
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Help with [Microsoft][ODBC Microsoft Access Driver]Error in row

    hi all,
    it seems i have the same problem updating a field in access database here is what my access table has:
    a field called userID of type String in Access 2000 on XP.
    i wrote the following code in java using Eclipse 3.1.1 ( latest) to update that field:
    String database= "jdbc:odbc:Driver={Microsoft Access Driver(*.mdb)};DBQ=";
    String url= database + filename.trim() + ";DriverID=22;READONLY=true}";
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con= DriverManager.getConnection( url,"","");
    con.setAutoCommit(false);
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
    stmt.executeQuery("SELECT Users.* FROM Users");
    ResultSet rs = stmt.getResultSet();
    rs.moveToInsertRow();
    rs.updateInt(1,"test");
    rs.updateRow();
    con.commit();
    rs.close();
    stmt.close()
    con.close();
    i get this error :[Microsoft][ODBC Driver Manager] Invalid cursor state
    if i use the same code with using re.next(); before rs.moveToInsertRow(); i get [Microsoft][ODBC Microsoft Access Driver]Error in row
    i get the errors right at : rs.updateRow();
    i dont know what exactly the problem is. why doesnt it get updated and complain about it.
    plz help

    I'm not sure which JDBC driver you are using.
    An access database, by default, has a username and
    password as "admin" and "" (ie, empty password).
    Actually MS Access has two methods for security. You
    are referring to one of them.
    If the password of admin is changed, you have to
    provide the name of the workgroup information file
    also( where it is stored) for making a connection.
    I am not sure about the ODBC bridge driver. What iam
    using is Atinav's aveConnet JDBC driver. It has
    provision for giving username and passwords through
    Workgroup information file. In addition to it youcan
    give the database password also.
    Interesting to note. The bridge for MS Access does
    not use that security method. And it will fail if you
    set up security using the groups/users adminstration.
    The only method it allows is via the "database
    password" method.Thank you for your response, but what User ID should I use when I use database password?
    openConnection(URL,"xxxx","database password")
    thanks again
    David Ling

  • HELP! How can i restore/recover files from Bootcamp with Boot Failure - Missing operating system error?

    Hi,
    I am having a few problems with bootcamp on my imac. When i tried to move the bootcamp partition on windows 7 into free space, it crashed and turned off. Ever since i have had the error 'Missing operating system' and it fails to boot. I have some very important files on the bootcamp partition. Is it possible to recover these files or even to restore the bootcamp partition to it's original state? I do not have a backup of my bootcamp partition. Another problem i have is that ever since i tried to expand my macintosh HD partition into free space, when i hold alt while booting up (to choose which partition to boot like i normally do), the bootcamp partition has stopped appearing. This means that i cannot even boot the windows 7 bootcamp partition anymore!
    So basically here are my 2 questions:
    How can i restore/recover files from Bootcamp with Boot Failure - Missing operating system error?
    How can i make the Bootcamp partition appear in Startup Disk and when i hold the option key while starting up my computer to allow me to boot windows 7?
    Any solutions are very much apreciated!
    Thanks!
    I know that bootcamp (disk0s4) hasn't been fully deleted since it appears in disk utility (i cant do anything to it though)
    And here is the error i see when i try to launch bootcamp (back when i was actually able to boot up bootcamp to the error screen)

    WinClone 3 is OS X and saves Windows image it makes for restore - that should work but you will have to try and you would need to make a new image unless it also works with a native Windows system restore image. It is now supported and has come a long way.
    http://www.twocanoes.com/
    Paragon Clone OS works and does disk-to-disk clone just like CCC you end up with two bootable drives. But does not work with your setup. It would let you clone and move your Windows install to an SSD or another disk drive though and be bootable.
    During its clone process it checks for errors which is very helpful and lets you know - something CCC and others should adopt more of.
    http://www.paragon-software.com/downloads/demo.html
    I wish for our/my sake you had re-read and rewritten the long 'story' and broken it into a brief list of facts we needed.
    OS X
    Windows
    Backup (though external is much safer) and you want bootable OS X clones as well as TimeMachine
    https://support.apple.com/kb/HT1427
    https://support.apple.com/kb/HT1553
    There are a number of things to do like chkdsk and others as well as Windows DVD to do automatic system repairs and find out why.
    AppleHFS - the abilty to mount and read HFS volumes can be notorious.
    I would rearrange and redo your storage setup and how you use the 4-5 internal hard drive bays.

  • Access oracle database from microsoft access?

    It is possible access to an'ORACLE database from Microsoft Access?

    Yes, that's possible.
    You can find several threads for this on the forum,e.g.
    Oracle & MS Access

Maybe you are looking for

  • Video shoot with iPhone 4 to PC?

    I can't seem to find a way to sync the videos I shot with iPhone 4 to my PC, help please?

  • Crashes upon launching games...

    When I try launch most games on my macbook pro (early 2011) it either sits in the dock or just crashes instantly after displaying. Ive tried completelly uninstalling and reinstalling, repairing disk permissions and even completelly reinstalling the O

  • 400 firewire vs 800 firewire

    I am purchasing a 500gb external hard drive. I am going to use it for editing home video on final cut express. Right now I am shooting in dv but will switch to hd (I have a sony hd camcord)when a little more practical to burn HD dvds. IS it worth the

  • SIZE_CONTROL Event for docking container

    Hi, Everybody I'm trying to handle size_control event for a docking container. But the event is not trigged. See the code excerpt below: * Create left docking container   CREATE OBJECT ao_docking_container_left     EXPORTING       side = cl_gui_docki

  • How do I create tabs on front panels

    Hi everyone. I want to create multiple front panels on the same project. How do I go about this? Also, I needed to analyze noise from a thermocouple signal in terms of Probability  Density Function and power spectral density and I don't have a clue y