Re: How can legally include " ' " (single quote) in my SQL stateme

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Erland Sommarskog (esquel_at_sommarskog.se)
Date: 03/14/05


Date: Mon, 14 Mar 2005 23:03:38 +0000 (UTC)

Newbie (Newbie@discussions.microsoft.com) writes:
> I take your advice and it works beautifully with MS Access. But, I am
> now getting an error of "ORA-00936: missing _expression" when I am
> applying it to Oracle database. For some reason, Oracle does not like
> the use of parameters in SQL statement. My SQL statement is shown in
> the debug mode as below.
>
> insert into table_name
> values(@param1, @param2)
> where column1, column2
>
> I checked Oracle SQL syntax and found nothing missing or wrong with this
> statement. Have you ever experienced this problem? If so, how did you
> resolve it? Thanks again for your advice.

I have never used Oracle, so I'm a bit off-base here. But it may be
that you have to use ? instead of @var with the Oracle OLE DB Provider.

Note that this newsgroup is about using the OLE DB API, so it's not
the best group to get answers for ADO .Net issues, and even less with
Oracle syntax.

-- 
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp


Relevant Pages

  • Re: CBO & different execution plans
    ... a SQL statement in a packaged application that was taking excessively ... long to execute - roughly 3.4 seconds per execution and the packaged ... The problem in this case had to do with Oracle picking ... Providing a hint to Oracle to use ...
    (comp.databases.oracle.server)
  • Re: DBD::Oracle installation - make test failed - ORA-28000: accout locked
    ... tests so no more complaints about the wrong return values from exit. ... But the test 20 and 21 still failed, the errors seem to be Oracle ... SQL statement ... Subject: DBD::Oracle installation - make test failed - ORA-28000: accout ...
    (perl.dbi.users)
  • Re: formula help please
    ... primary and foreign keys are essentials in solving such problems. ... each of the tables are related to each other with each SQL statement. ... engine like Oracle), the program adds additional lines to the actual ... WHERE clause that describes how the tables are to be linked together. ...
    (comp.databases.oracle.misc)
  • Re: SELECT statement efficiency question
    ... Keep in mind that Oracle may transform your SQL statement into another ... suppose on-the-fly compiling of the PL/SQL code if not using Native ...
    (comp.databases.oracle.server)
  • Re: Oracle jdbc perf on linux and windows
    ... >> an Oracle configuration problem. ... particular SQL statement as well on Linux as it does on Windows/MacOS? ... What driver are you using? ...
    (comp.lang.java.programmer)