473,809 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access/Oracle ora-00907 error

1 New Member
Hi all!

I have a Access db with some vb running sql against an oracle db... It works well at some of our sites, but I get an ora-00907 error in other places. I think the problem comes in the following line :

sql9 = "(select sum(decode(subs tr(result_type, 1,1),'C',1,0)) from prospect_contac t pc,prospect_bas e pb, base_pledge bp,segment_grou p_control sg,campus.resul t_codes rc where pb.id_number = pc.id_number And pb.segment_grou p = sg.segment_grou p and sg.result_group = rc.result_group and pb.id_number = bp.id_number (+) and pc.last_result = rc.result_code and pc.last_call_Da te between to_date('" & Format(DLookup( "Month1", "qryFY"), "mm\/dd\/yyyy") & "','mm-dd-yyyy') and to_date('" & Format(DLookup( "Month1End" , "qryFY"), "mm\/dd\/yyyy") & "','mm-dd-yyyy')) Month1Completes "

I am running out of ideas of why it works/doesn't work.... Help me!!!
Aug 2 '07 #1
1 1901
MMcCarthy
14,534 Recognized Expert Moderator MVP
You have problems with your quotation marks and spacings, try the following:
Expand|Select|Wrap|Line Numbers
  1. sql9 = "(select sum(decode(substr(result_type,1,1),'C',1,0)) " & _
  2.     "FROM prospect_contact pc, prospect_base pb, base_pledge bp, " & _
  3.     "segment_group_control sg, campus.result_codes rc " & _
  4.     "WHERE pb.id_number = pc.id_number " & _
  5.     "AND pb.segment_group = sg.segment_group " & _
  6.     "AND sg.result_group = rc.result_group  " & _
  7.     "AND pb.id_number = bp.id_number (+)  " & _
  8.     "AND pc.last_result = rc.result_code  " & _
  9.     "AND pc.last_call_Date BETWEEN to_date('" & _
  10.     Format(DLookup("[Month1]", "qryFY"), "mm\/dd\/yyyy") & "','mm-dd-yyyy')  " & _
  11.     "AND to_date('" & Format(DLookup("[Month1End]", "qryFY"), "mm\/dd\/yyyy") & "','mm-dd-yyyy')"
  12.  
Make sure the DLookup statements are only returning one value and I also removed the last word from the end as I couldn't figure out what it were doing.
Aug 6 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
12693
by: Chad The Man | last post by:
I have been developing some applications on suse 9 / apache 1.37 / php 4.3.4 / Oracle 9i / OCI8. We recently moved servers, apache works fine, php works fine, oracle works fine... however, trying to connect to oracle from php it dies with the following error : Warning: ocilogon(): _oci_open_session: OCIHandleAlloc OCI_HTYPE_SVCCTX: OCI_INVALID_HANDLE Using SQL plus I can connect just fine. The variables are all set in apache and the...
3
14529
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there for slowness. Once I'm connected the queries work pretty much instantanously but to connect using SQLPLUS, Toad, ODBC, OLEDB all take about 10 secs. I connect using OLEDB from Visual Basic development environment & after the 1st connection...
1
6202
by: X | last post by:
Howdy: To follow up on a problem with MS Access (2000) and Oracle 9i (9.2.0.x) - History: I am trying to import tables from my Oracle 9i database on RedHat Linux 7.2 to MS Access (2000) on NT. I managed to turn on logging / debugging for ODBC connections and I got a few messages that I am unfamiliar with.
7
13441
by: NTidd | last post by:
Since we have upgraded to oracle 9i every day or so we have to go in and shutdown oracle and restart it, here is what we do: sqlplus /nolog connect sys as sysdba password: connected to an idle instance shutdown ORA-01034 Oracle not available ORA-27101 Shared memory realm does not exist
6
3926
by: Jean | last post by:
Hi, I am using an Access 2000 front-end to an Oracle 9 backend. I want to write a query that returns all records that are not older than one year for Column "Status_30" (which is a Date). When I look at the ODBC Datasource in Table DWHADMIN_V_PROBLEM , the Date formatting looks normal to me, like #05/07/2005#. However, when I try using the following in my Access Query :
4
3742
by: z | last post by:
To reconfigure oracle9i from server to client operation, two files need to be modified: listener.ora (for the server IP address), and tnsnames.ora (for user permissions). What are the analogous files to be modified for db2? I looked at a couple of manuals, but only got the instruction to re-install db2 specifying client. For various reasons, that is impractical for my situation.
8
9644
by: Greg Strong | last post by:
Hello All, The short questions are 1 Do you know how to make DSN connection close in Access to Oracle 10g Express Edition? &/or 2 Do you know how to make a DSN-less pass-through query work from
16
9193
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild ----------------------------------------------------
1
7829
by: Vinod Sadanandan | last post by:
Cross Platform Migration An Unproblematic Approach (Windows-UNIX ) Oracle 10\11g The principal restriction on cross-platform transportable database is that the source and destination platform must share the same endian format. Redo log files and control files from the source database are not transported to destination database . New control files and redo log files are created for the new database during the transport process, and an ...
0
604
by: Jim Kennedy | last post by:
ALL DDL does a commit. Hence Drop Table movies; issues a commit. True you don't issue a commit and the driver does not issue a commit, but the server does for all DDL. That is probably where your commit is coming from. Jim -- Replace part of the email address: kennedy-down_with_spammers@attbi.com with family. Remove the negative part, keep the minus sign. You can figure it out.
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10635
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.