Join Syntax Errors Translating Oracle SQL To Access SQL
Mar 21, 2008
I've developed a working query to grab some information from my Oracle 9i database using SQL Developer. I have a tool in MS Access 2003 that I'm developing for other users so they can input some options through the GUI and query the same data that I do.
I'm trying to translate the query I developed in Oracle and have it work in Access. I have my ODBC connection set up so that Access can get to the same tables.
Here is my Oracle Query:
[QUERY]...
The error I'm receiving is: Run-time error '3296'
Join expression not support.
I believe the error has something to do with the "LEFT JOIN CPCF ... " but I can't seem to figure out how to fix it. The query will run in Access if I change that to an "INNER JOIN CPCF ...." but the result set is not what I need it to be. Any thoughts on how to fix this?
SELECT p.AcntNumber, p.Name, d.FromDate FROM Daysheet AS d INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber
But this does not:
SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT FROM Daysheet AS d INNER JOIN Patient AS p ON d.AcntNumber=p.AcntNumber INNER JOIN Charge AS c ON c.Id=d.ChargeNum
Nor this:
SELECT p.AcntNumber, p.Name, d.FromDate, c.CPT FROM Daysheet AS d (INNER JOIN Patient AS p (INNER JOIN Charge AS c ON c.Id=d.ChargeNum) ON d.AcntNumber=p.AcntNumber)
I seem to have the biggest problem with getting information from one window/form to another. I have a MainForm, that has 2 subforms on it. On the subform2 there is a command button that opens a new “Form3” in “dialog”. Form3 has a list box displaying data from a table and a command button that says “Add to Subfom2”. I want to get the information from Form3 and update the unbound textbox on subform2. I keep getting errors; “Field not found in….” I have tried: Forms!MainForm!Subform2.Textbox = ListBox.Colunm(1) Forms!MainForm!Subform2.Form!Textbox = ListBox.Colunm(1) Forms!MainForm!Subform2!Textbox = ListBox.Colunm(1) None seem to work, what am I doing wrong? Can some on help me with this syntax. Thanks Enviva
I have the following statement entered in the query criteria section.
SELECT MAX(EDRMPeriod) FROM EDRAppC WHERE EDRMPeriod Between DateAdd("yyyy",-1,DateSerial(Year(EDRMPeriod),Month(EDRMPeriod)+1, 1)) AND DateSerial(Year(EDRMPeriod),Month(EDRMPeriod)+1,1) GROUP BY EDRCHPlan
I am getting a syntax error. This statement runs fine and produces the results I want in Queryman. Thanks for any help. k
My DB has one main table where all the records are stored, and one form with multiple tabs allowing for data entry and editing. There are two distinct "Data Types" I have in the tables, so on the two distinct form tabs, I created a text box with a default value for each one (if it's a Type A record, then the box has a default value of "Type A" and the same rules for Type B).
Here's the problem. It doesn't matter if I include the default value in the Form Properties Default Value field or if I do in VBA (using this method), when a new record is entered into the table, it makes them all default Type B records.
I donot have much information at this time, but siiting in an Oracle fusion meeting, the Oracle reps mentioned they have a product to compete with MSAccess. Of course it runs on Oracle instead. They said Oracle had to come with a competing product because to many Access databases turn into Sql Server databases. That is about all the info. I have right now on this. Thought it an interesting subject however.
I'm just looking for some general views and opinions here and would love to know what people think; advantages/ disadvantages etc.
We have a system of spreadsheets traking various ongoing projects in our organisation which are sitting on 6 different regional servers. This poses a number of problems as you can imagine - no way of collating the data or generating reports centrally. Updates/bug fixes cannot be carried out because it would require chaning each workbook individually and so on and so on.
I am trying to make an argument to create a new Oracle based database or similar which will be held on a central server and accessed through the company's intranet.
What I'm trying to do is compile a list of the possible reasons to do this or not as the case may be. Opinions or arguments for and against would be most welcome.
We use an Oracle base software called Trapeze and Microsoft Access sometime used as a front end to access the Trapeze oracle tables. Due to the possible dangers of allowing the users Access, Is there a way to block the users from changing the oracle tables and only be able in MS Access to create reports and queries? Trapeze's security is antiquated and uses Oracle to validate accessibility. Since a user has to be created in Oracle, with update, delete, read, write, append rights, for Trapeze to work correctly, a user can connect directly to the Db through Access and make changes directly to the data, unless the ability to prevent them from modifying the tables and only create reports and queries that they can save.
I'm trying to link to Oracle through ODBC...everyhting is set up, and I can connect and I can also see the tables..The problem is...there are just toooo many tables in the link window!!!....
Does anybody know how to find the right table you want faster??? Or how to limit the tables that are retrieved from Oracle to just the ones I desire?
I even set up the correct Schemas to just view the tables I want...but It won't work when linking it through ODBC!..All the tables appear over and over again... And the list is just tooo long.
I was hired to write some reports in Access 2000 for a small company (max of 6 users at a time). The database was created by someone else and he decided that moving to Oracle was the answer to some of their issues (losing data due to record locking). The guy did not know Access at all so that DB is screwed up (another issue all together). I had no problem creating the reports and they ran fine on my home and work computer. When I imported the reports into the Access DB at this company they ran fine (but VERY slow). I then got a call 3 days later from them saying the reports wouldn’t run. The owner decided to upgrade to Access 2003 to see if that would help but that created another set of new error messages. When I try to run the report it gives two messages: "can not perform action/make changes in record primary key" and "record not found". These reports are based on simple select queries. Trying to run the reports freezes the application. I even tried to open the tables and it either freezes the app or takes about 15 minutes to open. These tables are linked to Oracle 8i. The newest OBDC drivers have been installed and the newest Oracle 8I edition has been installed. Since I can run the reports in Access I assume the issue is the link with Oracle. I have very little Oracle knowledge. From what I can tell the data is stored in Oracle and Access pulls the data via the links. Has anyone experienced this? Does anyone know how to fix the issue? Your help is very much appreciated!
I'd like to transfer access-queries to Oracle. If I export access-queries, Oracle recognize these as tables and not as dynamic queries? Any idea how to solve this or does anybody know a tool to create queris in Oracle?
* Oracle 9i Enterprise Edition Release 9.2.0.5.0 * Microsoft Access 2002 * Access is running on a XP Professional desktop
What I'm doing at the moment is:
* Linking the Oracle tables in Access via ODBC * Using Access to run develop & run queries against the linked Oracle tables
What I'm trying to figure out:
* What is the easiest way to export the query results to a local (on my machine) Access table?
Some of the queries return < 65000 rows, so I can export to excel & import the excel file back into access. Unfortunately this doesn't work for the bigger queries.
Hi, I have a question regarding improving the performance of an Access front-end linking to Oracle tables.
Basically what I have done so far is migrate around 35 or so tables into an Oracle 9i database. After linking the tables in Access and prototyping some of the existing forms/reports/queries in Access, I noticed that the speed performance of everything was noticeably slower. Any suggestions as to how I can resolve this issue? For read online queries and reports, I understand that I can use a pass-through query to speed things up. However, all the forms need to allow for data entry and based on my understanding, the pass-through query solution would NOT work for this.
I have written a few solutions in Access (using access 2007). Now I going to create a few new ones for my company. We use Oracle for our main database and was wondering what would be the advantages and disadvantages of using Oracle as my backend while Access is my front end?
Also, should I create the queries in Access or in Oracle?
finally, is there anything I need to do differently?
I have linked ms access to orcale to run a query, the date in orcale is in this format 20140101, i have tried to convert the date in the query like that but it's not working. format(mydate,"yyyy/mm/dd".
I want to access Oracle 8.0 Data (meaning Oracle tables) with Access 2002. My problem is that I do not want to enter the username and password every time I connect to the Access db, as I want to create some queries in Access which I will export to Excel.
I do not think that this is something difficult but I can't seem to find any solution. Is there any proposal?
I'm making a MS Access frontend for some tables on the Oracle 8 database at work. The tables are linked ofcourse.
One table has an AUTONUMBER field on the Oracle and it seems to give me trouble to insert new records. When I try to insert a new record (leave the autonumber field blank) I get the following error: "ODBC — insert on a linked table <table> failed. (Error 3155)" followed by the error "[Microsoft][ODBC Driver for Oracle][Oracle]ORA-01722: invalid number (#1722)".
When I look at the Oracle documentation I got this: ORA-01722 invalid number Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates. Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation. I checked the INSERT statement: "INSERT INTO AFM_HV_PROP_VALUE (HV_INST_ID, HV_PROPERTY_ID, TABLE_NAME, HV_PROPERTY_VALUE) VALUES (4, 'V_TESTJE', 'hv_inst', '123465')" and everything seems to be allright. The value that's causing the error is the "4" that gets in the "HV_INST_ID"-field. Using TOAD to execute the SQL Statement, there is no problem at all.
When I look at the table design in MS Access I see that the Autonumber field is of the type "Double". That doesn't seem right to me...
Anyone some suggestions? I'm running out of courage :s
We have a user that wants to pull data from multiple oracle tables into one access table. She will probably want to run this process daily. The tables will join easy enough, but I wasn't sure what the best way to go about doing this was. I haven't used access very much. Again, this is a member of the user community and she is wanting to do this thru access. Ideally, if it could be automated some way, or set up in some way where the user would not have to do much more than start the process (and not have to redo any "select" statements each time). I would assume some kind of combination of links and import (maybe using a macro?), but again I know very little about access.
Hi, Can anybody help me ? I've a case where ms access displays oracle's numeric field as text where msaccess is linked to oracle.The possible reason could be when we don't specify precision in declaring the filed in oracle table, default precision is 38 which ms access cannot hold. So, it(driver) converts this to text field.But this is with MSORCL32.dll(microsoft driver for oracle).Is there any other possible reason that will result this behavior?
The following are the configuration details: 1.Oracle 9i on Unix server. 2.MSAccess on Windows XP. MSAccess holds linked data of Oracle server.
Currently I have MS Access DB which has some Oracle database table reference using database link concept. I have entered DSN Name,user id and password which it asks when I try to run some queries which will fetch data from oralce DB linked tables.If some wants to use my MS Access DB, they need to have DSN and everytime they run queries related to Oracle database table reference, it will ask for DSN,user id and password. For this I need to share the user id and password credentials to everyone who wishes to use my MS Access DB which I don't want to. Is there a way to avoid the login window whenever some one wants to use my MS Access DB without asking for oracle user id and password credentials everytime? My ultimate aim would be encrypt password for others.
I have to use MS Access as front end with ODBC connection to Oracle 9i
DB.
The application(forms) should be able to update, delete ,insert records into oracle tables(backend).
i have a main form,which has some unique id's and other info about the ids and the subform shows several matching id's for that unique id in main form. the user who uses this application should be able to 1) search for the unique id in the main form such that the subform displays all its matches 2) they should be able to select anyone match and say approve(there can only be one match), then that particular record should be updated in the table.IF I USE A CHECK BOX AND IF THEY CLICK ON ONE RECORD AS MATCH,HOW DO I TAKE THAT RECORD SAY THE ID , NAME ADDRESS AND ALL DETAILS AND UPDATE THE TABLE??? similarly when they select some other record i should give option of deleting other irrelevant matches in the backend table.
the main form and the subform uses the same table as source.updates are to another table, i should also have to put entry into audit table about which record was deleted and which one inserted..
How should i do this?? i am new to MS access .VBA, any help would be highly appreciated!
Since we have installed the latest Windows critical security updates, upon closing an Access database, the database gets corrupted. Error code is c000020c.