Access SQL

Hi,
Whats wrong with this SQL statement?
SELECT * FROM Main_tbl, Contact_tbl, AdminComments_tbl Left
Join
AdminComments_tbl ON Main_tbl.ID=AdminComments_tbl.Maintblid
WHERE
(Main_tbl.CompanyID = Contact_tbl.AutoID)
I keep getting the following error:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error in
JOIN operation.
Thanks!

Hi Pat,
From your reply - maybe I need to be specific about the
Select statment and
only list which variables I need?
Thanks
"Pat Shaw" <[email protected]> wrote in message
news:fgrvc9$pom$[email protected]..
>> Whats wrong with this SQL statement?
>
> Just about everything!
>
> You really need to think about what you are trying to
achieve with your
> SELECT and then form your query with consideration and
thought. You have
> errors just about everywhere in your current statement.
>
> Pat.
>
>
> "MM User" <[email protected]> wrote in message
> news:fgqugg$eko$[email protected]..
>> Hi,
>>
>> Whats wrong with this SQL statement?
>>
>> SELECT * FROM Main_tbl, Contact_tbl,
AdminComments_tbl Left Join
>> AdminComments_tbl ON
Main_tbl.ID=AdminComments_tbl.Maintblid WHERE
>> (Main_tbl.CompanyID = Contact_tbl.AutoID)
>>
>>
>> I keep getting the following error:
>>
>> Microsoft OLE DB Provider for ODBC Drivers error
'80040e14'
>>
>> [Microsoft][ODBC Microsoft Access Driver] Syntax
error in JOIN operation.
>>
>>
>> Thanks!
>
>

Similar Messages

  • An error has occurred while accessing SQL database or system resources. If this is the first time you have seen this message, please try again later. If this problem persists, please contact your administrator.

    I have SP Server 2010, and when I try to DELETE a rule within an existing Audience, "Property (Account Name) = domain/username", I get this error, "An error has occurred while accessing SQL database or system resources. If this
    is the first time you have seen this message, please try again later. If this
    problem persists, please contact your administrator."  When I try to "MODIFY" the rule I get this error, "One or more values typed on this page are not valid. Check the text for the indicated fields." 
    The last time I checked it was working, I'm not aware of any new updates installed recently?  I did a full Profile Synchronization as well, but still not working, please advise? -- Evenstarline

    Hi Sara,
    First of all thank you very much for your prompt responses. Here are my comments to each of your suggestions below, and just to let you know I am using a Farm Admin account.  I
    was able to do this way after we upgraded from SP 2007 to SP 2010 as well.   I would like to mention I'm not a SP expert, just been given the responsibility due to another person handling it just left, so apologize with some of
    my novice questions below?
    1. When I change the Operators to "Contains" or "Not Contains" get generates this error below.
         Error generating in red towards top of the audience page..."One or more values typed on this page are not valid.  Check the text for the indicated fields."
         Error occurred where you enter your "Value"..."Could not resolve the user identity. Please re-enter the account name."
    2. We have a 3-server-tier topology (SPWeb, SPDB, and SPFarm).  Does the updates only apply to where the Central Admin is installed, which is the "SPFarm"?  I checked all
    3 servers, and NONE of the updates (KB2899494, KB2889845, and KB2883055) you'd mentioned are installed.
    3. I'm new to IISRET, I need to be extra cautious of what I run in production, is this safe to run with no problem?  What does it do?  And How do I run it?
    4. I'm also new to viewing the ULS log.  I'd just downloaded a viewer for it.  I'm assuming the only logs I need to be concern with viewing are within the SPAdmin (where Central
    Admin is installed)?  There's so many of them, what should I be looking for exactly?
    Evenstarline 

  • 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

  • Access SQL Query Problem - Pls help

    Hi,
    I'm connecting to an Access database and have a query which looks somehting like this:
    SELECT Accept.ACCEPT_NO,
         Accept.CURRENCY,
         Accept.INT_RATE,
         Accept.F_AMOUNT,
         Accept.DEALER,
         Accept.MATURITY,
         Accept.START_DATE,
         Accept.DEAL_DATE,
         Accept.DEALTICKET,
         Accept.BANK_NAME,
         Accept.CALC_DAYS,
         "2001/11/22" AS CurrentDate
    FROM Accept;
    It works fine without the line with CurrentDate so i'm sure something's wrong there. What i want to do is set CurrentDate as a constant ("2001/11/22") i dont have any experience with Access so any help you could give me would be greatly appreciated.
    Thanx in advance.

    I was able to successfully query an access 97 database using the following SQL:
    String sql = "SELECT emp.emp_fname, emp.emp_lname, '2001/11/22' AS CurrentDate FROM emp";don't know why your's wouldn't work. Was there a SQLException? Or are you trying to get it to work using the Access SQL editor?
    Jamie

  • 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

  • Issues trying to Access SQL Plus after downloading 8i Trial Version

    After successfully downloading Oracle 8i Personal Edition, I am trying to access SQL Plus, it requires to enter a User Name, Password and Host String. I enter my OTN Password ID and I am refused access. Does anyone have any ideas why?

    harry,
    i am assuming you are using 6.0.8.8 of reports6i, which is base-release. there have been problems withthe OCA in this version. by using the latest patch you should solve this problem. for further details, please contact oracle support services.
    regards,
    the oracle reports team

  • Rewriting a Access SQL-query to get it working in JDBC?!

    The following select-query works for me in Access:
    SELECT * FROM aWoord WHERE Woord LIKE 'a[!f,p][!n][a-z][a-z][a-z]';
    aWoord contains 6-letter woords starting with a.
    But when I use this in
    Driver driver = new JdbcOdbcDriver();
    Properties info = new Properties();
    String url = "jdbc:odbc:" + dsn;
    con = driver.connect(url,info);
    if (con != null)
    stmt = con.createStatement();
    And then
    ResultSet res = stmt.executeQuery(sql);
    In which sql is the above Access SQL string. It doesn't produce any results! I know the problem lies in the "Like-part" can't I use [!p] in JDBC?! Or should I use a different notation?
    Stijn.

    My connection is ok, because I can get results if I use a "simple statement" like:
    "SELECT * FROM aWoord;"
    This gives me the total content of the table aWoord.
    But when I use the statement mentioned above it doesn't work.
    This also doesn't work:
    "SELECT * FROM aWoord WHERE Woord LIKE '*';"
    I have to use the following:
    "SELECT * FROM aWoord WHERE Woord LIKE '%';"
    I know * is a wildcard for DAO and % for ADO but the database is an Access database thus DAO or not!?
    Stijn.

  • Accessing Sql Server from AS400 Java program

    Hi everybody,
    I am trying to access Sql Server from an AS400 Java program. I have tried various Sql Server JDBC drivers including the Microsoft one but no luck yet. When i try to compile my Java program (with driver file in the classpath) it gives some errors on the driver jar file and also it throws out lots of unreadable text characters. This gave me a feeling that probably its a character coding issue with the jar file, so i tried ftp the file in binary mode as well as copying through the Operations Navigator. But still compilation is giving the same kind of errors.
    Do I need to have some special JDBC Drivers compiled for AS400 specifically. My understanding was that Java is platform independent so any JDBC Type 4 driver will work.
    We are running Java 1.3 on the AS400. Any help on this issue would be great.
    Thanks
    Inder

    Thanks for the help. I am writing a Java program after a long time that's why was making that mistake. Now the program gets compiled correctly but on running the program i am getting the following error message:
    java 001-0070: Exception JVAB544 not expected
    /myjava/test/msbase.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/msutil.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    /myjava/test/mssqlserver.jar: 001-0050 Syntax error on Line 1: token ')' not expected
    I have no idea what is this error about. Though the same driver files don't give any error when running on a Windows machine.
    Thanks

  • Problem accessing SQL Express 2008 R2 after VS package install

    I've written an application package in Visual Studio 2010 which requires SQL Express 2008 R2. I've also created a separate setup package and set SQL Express as a prerequisite. Everything runs as expected except that after the install on target machine
    I do not have adequate permissions in SQL to attach the database or set up the user via SQLCMD script. This happens on WIN 7 and up. I know it is a permissions issue with the default install of SQL but do not know how to otherwise perform the install and make
    it work. Looking for someone to walk me through and resolve this issue.

    Hi Zanith,
    Actually this forum is to discuss the VS IDE issue.
    >> Everything runs as expected except that after the install on target machine I do not have adequate permissions in SQL to attach the database or set up the user via SQLCMD script
    Based on your description, the important issue would be related to the permission, as my understanding, it would be related to the SQL Server setup or configuration.
    So my suggestion is that you’d better post this issue to the SQL Server forum.
    https://social.technet.microsoft.com/Forums/en-US/home?forum=sqlgetstarted
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlexpress
    I also found two cases about the SQL Server permission issue.
    Reference:
    http://stackoverflow.com/questions/9185142/sql-server-2008-r2-express-permissions-cannot-create-database-or-modify-users
    http://serverfault.com/questions/53645/don-t-have-permission-to-access-sql-server-express-2008
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Problem accessing Sql server Procedure from Crystal with JDBC driver

    I have some Crystal reports using SQL Server procedures, most of them are working very well; however, I have 2 that have problems accessing sql server procedures. These reports are working using OLE DB connection without problem, but when I try to relocate the connection to JDBC Crystal generates an error like that the procedure not return records.
    The procedure is working with other products including OLE DB connections from crystal.
    What can I do?
    Thanks in Advance,
    JaimeC

    I am using:
    Crystal report 11 - 11.0.0.1282 and Crystal 2008 = 12.0.0.683
    SQL Server 2005 -  Microsoft SQL Server Management Studio Express     9.00.4035.00
    Windows XP
    I have discovered that the procedures create and work  temporary tables. In other cases when is working ok, the procedures have not working temporary tables.
    Thanks,
    Jaime Carrillo

  • 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

  • Access sql table

    Hi
    How do you access sql table to get data reflected in planning forms (apart from the HAL or via API) , Here we are using Planning 9.3.1. Is there any other way to access data.
    regards
    M.V

    You load data into the underlying Essbase database, so you can use the native capabilities there.
    Those include a SQL Interface tool that allows you to pull directly from relational tables/schemas using standard SQL statements via Essbase load rules. The next stage up from this is to use the Integration Services (EIS) toolset that enables you to create complex integrations via models and use these to push data into Essbase.
    Hope this helps
    Andy King
    www.analitica.co.uk

  • Accessing SQL Server form SAP

    HI,
    I want to get data on SQL Server from SAP.
    What is the procedure to do the above.
    Thanks.

    hi
    in the SAP HELP Content,followthe instructions for Tutorial 2: Accessing SQL Server
    <u><i><b>also take  alook at this presentation</b></i></u>
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/2e81685c-0701-0010-0eb3-918c6d56783a
    Below: is the Tutorial 2 instructions.
    In this tutorial you will create a portal component that retrieves and displays information from an MS SQL Server database. Your portal component will display information from the Northwind Categories table in a SAP NetWeaver .NET Table control. You will create a dataset to fill with the data and bind the Table control to this dataset to display data.
    Note: using a dataset is one of the data access options, which is not always recommended. You will use a dataset in this tutorial for the simplicity.
    To complete this tutorial, you need:
    Access to a MS SQL Server with valid permissions for the Northwind sample database
    Access to a running portal
    A portal user account with administrator's permissions
    The tutorial is split into a number of smaller pieces:
    Section 1. Creating the SAP Portal Application project
    Section 2. Creating and configuring the dataset
    Section 3. Adding the SAP NetWeaver Table control and binding it to the data
    Section 4. Adding code to fill the dataset and display the data
    Section 5. Viewing the component in the portal
    Section 1.
    =========================================================
    Creating the SAP Portal Application Project
    On the File menu, point to New, and then click Project.
    1. In the New Project dialog box, do the following:
    (a)In the Project Types pane, choose Visual C# Projects or Visual Basic Projects.
    (b)In the Templates pane, choose SAP Portal Application.
    (c)Specify a different name and location, or accept defaults.
    (d)Click OK.
    A new SAP Portal Application project is created at the specified location. A new portal component named PortalComponent1.ascx is added to your project automatically.
    Section 2.
    =========================================================
    Creating and Configuring the Dataset
    Prior to creating a dataset, you need to create and configure the data connection and data adapter.
    To create the data connection and data adapter
    1. From the Data tab of the Toolbox, drag an SqlDataAdapter object onto your portal component form. Data Adapter Configuration Wizard will help you create both the connection and the adapter.
    2. In the wizard, do the following:
    2(a)In the Choose Your Data Connection pane, create or select an existing connection to the SQL Server Northwind database.
    Important: when you configure the database connection, select the option Use a specific user name and password for server logon information. If your password is not blank, select the Allow to save password checkbox, and then select to Include the password in the connection string, when prompted. Although this is not a recommended practice, we use it in this tutorial for simplicity.
    2(b) In the Choose a Query Type pane, select the Use SQL statements option.
    2(c) In the Generate the SQL Statements pane, create the following SQL statement:
    SELECT CategoryID, CategoryName, Description FROM Categories
    If you need to build a different SQL statement, click Query Builder to open the Query Builder dialog box.
    2(d) Click Finish.
    The wizard adds two objects to your portal component: the SqlConnection1 object containing the database connection information and the SqlDataAdapter1 object containing the data definition.
    To generate the dataset
    1. From the Data menu, choose Generate DataSet. The Generate Dataset dialog box opens.
    Tip: If you do not see the Data menu, click the form; the form must have focus for the menu to appear.
    2. Select the New option and name the dataset dsCategories.
    3. Select the Categories table in the Choose which table(s) to add to the dataset listbox.
    4. Select the Add this dataset to the designer checkbox and click OK.
    Visual Studio generates the new dsCategories dataset class and the dsCategories.xsd schema that is added to Solution Explorer. An instance of the new dataset class (dsCategories1) is then added to the form.
    Section 3.
    =========================================================
    Adding the SAP NetWeaver .NET Table and Binding It to The Data
    1. From the SAP NetWeaver tab of the Toolbox, drag a Table control onto the portal component.
    2. Right-click it to open the Properties box.
    3. Set the DataSource property to dsCategories1.
    4. Set the DataMember property to Categories.
    Section 4.
    =========================================================
    Adding Code to Fill the Dataset and Display the Data
    Although the table is bound to the dataset, the data is not displayed automatically. You must explicitly fill the dataset and bind the table to its data source.
    To fill the dataset and display data in the Table control
    1. Double-click the form to switch to Code Editor.
    2. In the Page_Load event handler, call the data adapter's Fill method, passing it the dataset you want to fill:
    [C#]
    sqlDataAdapter1.Fill(dsCategories1);
    [Visual Basic]
    sqlDataAdapter1.Fill(dsCategories1)
    3. Call the DataBind method of the Table control to bind it to the dataset:
    [C#]
    Table1.DataBind();
    [Visual Basic]
    Table1.DataBind()
    4. Save your project.
    Section 5.
    =========================================================
    Viewing the Component in the Portal
    Deploy the PAR to the current portal.
    In Solution Explorer, right-click the portal component and choose View in Portal.
    The table with the list of categories is displayed in the browser.
    regards
    navjot
    reward accordingly
    Message was edited by:
            navjot sharma

  • Accessing SQL Server jar for EP6 SP19/EP7 SP11

    Hi,
    I have application that accesses SQL Server and used to run in old portals (SP under 13) but doesn't run under new portals.
    This is the driver I use:
    <i>com.sap.portals.jdbc.sqlserver.SQLServerDriver</i>
    I tried to include the following jars under the 'lib' folder - didn't help
    P9base.jar, P9sqlserver.jar, P9util.jar
    I get  "[SAP_Portals][SQLServer JDBC Driver]This driver is locked for use with embedded applications".
    What jar/driver do I need to use in order to run applications that access SQL server in the new portals.
    p.s
    I don't want to define connection in VA. I want to use DIRECT connection.
    Thanks,
    Omri

    Solved it on my own.
    MS SQL Server 2000
    jars: msbase.jar, msutil.jar, mssqlserver.jar 
    jdbc:sqlserver://<host_name>:<port>;DatabaseName=<db_name> 
    Driver name:  com.microsoft.jdbc.sqlserver.SQLServerDriver 
    Omri

Maybe you are looking for

  • Can no longer access internet on Wifi, 3g works fine

    For some reason, my iPhone 4 has stopped getting internet access when on wi fi. It gets on the network fine, and all other devices have no problem with this wi-fi connection (Airport Extreme). The phone gets on the web fine w/3G. I've reset everthing

  • Different fix lot size depending on the production version

    Hi all, I have the next scenario: 2 production versions. 2 different fix lot size por each. So: Prod Version 1 - Fix lot size 200 Prod Version 2 - Fix lot size 300 I created the Quota Arrangement just to make SAP to take my favourite version. And tro

  • How do I speak with someone in Customer SERVICE from the U.S. who isn't speaking from a script?

    I am very frustrated.  I have spent over 8 hours trying to get my Dreamweaver subscription to work on my PC to no avail.  Six hours have been spent with foreign support.  I want to speak with someone who isn't speaking from a script who can actually

  • Inserts/Updates on replicated tables Logical Standby Database ??

    Hello all, We have a Logical standby database on 10.2.0.5. Can you please suggest if there is a way we can do data inserts/updates on replicated tables ? Can this be done by doing a alter database guard none; or alter session disable|enable guard; ??

  • How to avoid closing up lines

    Hey, this structured stuff is serious fun! and I now have just one challenge left with my first serious xml-to-Frame project: code examples. In the source, these are tagged as follows, though with the opening [code] tag on a line by itself: > [code]