473,404 Members | 2,170 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Access/Oracle ora-00907 error

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(substr(result_type,1,1),'C',1,0)) from prospect_contact pc,prospect_base pb, base_pledge bp,segment_group_control sg,campus.result_codes rc where pb.id_number = pc.id_number And pb.segment_group = sg.segment_group 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_Date 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 1887
MMcCarthy
14,534 Expert Mod 8TB
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
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...
3
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...
1
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...
7
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...
6
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). ...
4
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...
8
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...
16
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
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...
0
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.