473,413 Members | 1,778 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,413 software developers and data experts.

Stop access from changing SQL queries

Is there any way to stop access (Access 2000) from changing the syntax of my SQL queries? For example, I don't always put the table_name.[field] because it makes it hard to read. Access doesn't have a problem running the query and letting me return to the same SQL view right after that. But when I save the query, close it, and open it up again it has made all sorts of modifications that make it hard for me to read. The other thing that it does is run all the code together as one long string rather than putting each field that I select on a separate line like I do for readability. Maybe I'm asking too much of access. Thanks.
Dec 7 '07 #1
4 2541
JustJim
407 Expert 256MB
Is there any way to stop access (Access 2000) from changing the syntax of my SQL queries? For example, I don't always put the table_name.[field] because it makes it hard to read. Access doesn't have a problem running the query and letting me return to the same SQL view right after that. But when I save the query, close it, and open it up again it has made all sorts of modifications that make it hard for me to read. The other thing that it does is run all the code together as one long string rather than putting each field that I select on a separate line like I do for readability. Maybe I'm asking too much of access. Thanks.
When you store a query in Access, it is analysed and optimised for you. See here for why this is a good thing. As you point out, it does take away some of the simplifications that you are using, but I suspect that it does this for reasons of eliminating possible ambiguities. You'll get used to reading the table names as part of the SQL.

Jim
Dec 7 '07 #2
I feared this would be the answer. It seems like there should be an option to turn it off for instances when time (or processing power or memory) is not a critical factor. For example, I'm dealing with a relatively small database and if the query takes twice as long as normal, that's pretty irrelevant to me. A half second or one second really doesn't matter. I thought that I remember that Oracle had a way that you could turn off the optimizer. I guess that's what I'm really looking for here. Thanks for that information.
Dec 7 '07 #3
JustJim
407 Expert 256MB
I feared this would be the answer. It seems like there should be an option to turn it off for instances when time (or processing power or memory) is not a critical factor. For example, I'm dealing with a relatively small database and if the query takes twice as long as normal, that's pretty irrelevant to me. A half second or one second really doesn't matter. I thought that I remember that Oracle had a way that you could turn off the optimizer. I guess that's what I'm really looking for here. Thanks for that information.
No worries Mate.
'AveAGoodWeekend

Jim
Dec 7 '07 #4
NeoPa
32,556 Expert Mod 16PB
I too find that irritating.
SQL is so much harder to work with when it's been Accessified :(
Dec 13 '07 #5

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

Similar topics

3
by: pbbriggs | last post by:
I will try to be as descriptive as possible, but this error has me stumped and I am not sure what relevant info to include.... I am running Access XP on a Windows XP machine. I initially began...
10
by: Marizel | last post by:
I'm not sure there's an easy solution to this, but thought I'd ask. I often find myself with a query which I'd like to reuse, but with a different datasource. These datasources generally have...
1
by: Suzi Carr | last post by:
Hello, We create querydefs in VB programs (i.e. CreateQueryDef). But as illustrated below, Access regenerates the SQL code we specify -- particularly the WHERE clause. While the new code is...
35
by: deko | last post by:
Do I get more scalability if I split my database? The way I calculate things now, I'll be lucky to get 100,000 records in my Access 2003 mdb. Here some math: Max mdb/mde size = 2000 x 1024 =...
15
by: brettclare | last post by:
I have linked a large SQL Server table to Access, however 'only' 2,195,439 records are shown and are available to query. Can I increase the size (cache??)/number of records showing in Access? ...
8
by: carriolan | last post by:
Hi I have an MS Access based application almost ready for distribution to the public and I find that even though I have compiled it into an MDE file, tables and queries can still be be imported if...
1
by: Good Man | last post by:
Hi there I've noticed some very weird things happening with my current MySQL setup on my XP Laptop, a development machine. For a while, I have been trying to get the MySQL cache to work....
6
by: InnoCreate | last post by:
Hi everyone. I've recently written a classic asp website which uses an MS Access datasource. I know this is less than an ideal data source as it has limited functionality. I have a search form on...
8
by: Sid | last post by:
I hope someone could help me with this. I am trying to setup a criteria to decide when to allow/not allow user to click on the check box. logically it looks simple but I am not able to...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...

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.