473,725 Members | 2,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Translating Access SQL queries into MySQL subqueries.

3 New Member
Translating Access SQL queries into SQL subqueries.
--------------------------------------------------------------------------------


I have a query in Access that uses a subquery, I would like some help on translating it into SQL as a subquery so I can use it in an application.

the queries in Access are
the subquery... (query4)
Expand|Select|Wrap|Line Numbers
  1. SELECT Movement.DateTime, Movement.StudentID, Movement.Subject, Movement.Teacher, Movement.Destination, Movement.Lesson
  2. FROM Movement
  3. WHERE (((Movement.DateTime) Between #6/15/2007 7:0:0# And #6/15/2007 19:0:0#) AND ((Movement.Destination)="Away" Or (Movement.Destination)="sign out" Or (Movement.Destination)="sign in") AND ((Movement.Lesson)=3)) OR (((Movement.DateTime) Between #6/15/2007 7:0:0# And #6/15/2007 19:0:0#) AND ((Movement.Destination)="sign in"));

the main query...
Expand|Select|Wrap|Line Numbers
  1. SELECT NStudTT.Student, NStudTT.Day, NStudTT.Lesson, NStudTT.Subject, Query4.DateTime, Query4.Subject, Query4.Teacher, Query4.Destination, Query4.Lesson, NStudTT.StudentID
  2. FROM Query4 RIGHT JOIN NStudTT ON Query4.StudentID=NStudTT.StudentID
  3. WHERE (((NStudTT.Day)=5) AND ((NStudTT.Lesson)=3) AND ((NStudTT.Subject) Like "stu*"));

thank you
Jun 18 '07 #1
1 1864
Rabbit
12,516 Recognized Expert Moderator MVP
Perhaps this is a question better suited for the MySQL forum? I don't know the syntax differences between Access and MySQL so I can't translate but the MySQL experts should be able to convert the syntax for you without having to know the exact syntax for Access.

Let me know if you want to move it.

Edit: I see you've already posted in the MySQL forum, disregard this post.
Jun 18 '07 #2

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

Similar topics

5
2424
by: Nick | last post by:
Im moving a development app (MySQL 5.0) to a different server which runs MySQL 4.0.20-standard. I am getting errors on queries that have subqueries such as... SELECT id FROM table1 WHERE id IN ( SELECT id FROM table1 )
2
1843
by: The Plankmeister | last post by:
Hi, I am converting some queries from stored procedures in MS Access to MySQL, and have hit my first problem. The Access query references another stored procedure, which is where the problem lies. I have the following table data: (apologies if the columns aren't aligned properly... it looks ok in a fixed-width font) img_num img_page img_sect img_order
1
1611
by: Ninjaboy | last post by:
I'm trying to run NOT EXISTS or NOT IN query to find out wich records in one table do not match the other and mysql just gives me weird error. QUERY: SELECT cust_id FROM customers WHERE cust_id NOT IN (SELECT * FROM nightwatch_matrix); ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT * FROM nightwatch_matrix)' at line 1
6
3430
by: Jegger | last post by:
Hello! We have following situation; network with 100 users, aplication developed in Access, user DB deployed on SQL Server. Is it better to create query inside aplication (with code) and then pass it to SQL Server for execution or is it better to have all these queries saved like stored procedures and then called from aplication?
1
3343
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ... www.soft30.com/download-1-11975.htm - 31k - Cached - Similar pages MDBSecure 1.0.8.0 - Soft30.com Utility which makes it easy to create secure MS Access Databases, ... MS Access 2000/2003 format. 30 day money back guarantee, 30 day trial. ...
5
1641
by: mathieu.page | last post by:
Hi, I often have recursives queries in my applications, like in this simplified example : req1 : SELECT EmployeNo, EmployeName, EmployePhone FROM Employe; req2 :
10
2371
by: Hank | last post by:
We have just recently migrated the data from our Access 2000 backend to Postgres. All forms and reports seem to run correctly but, in many cases, very slowly. We do not want to switch over until we can speed things up. We would like to start implementing Stored Procedures so we can do Server-Side processing. Can anyone recommend a book that would help us learn how to use sprocs or pass-through queries? I apologize if my terminology...
3
1445
by: timn | last post by:
I have a query in Access that uses a subquery, I would like some help on translating it into SQL as a subquery so I can use it in an application. the queries in Access are the subquery... (query4) SELECT Movement.DateTime, Movement.StudentID, Movement.Subject, Movement.Teacher, Movement.Destination, Movement.Lesson FROM Movement WHERE (((Movement.DateTime) Between #6/15/2007 7:0:0# And #6/15/2007 19:0:0#) AND...
0
7667
MMcCarthy
by: MMcCarthy | last post by:
Rather than using the Access design view change the view to SQL. I am going to attempt to outline the general syntax used for SQL queries in Access. Angle brackets <> are used in place of some syntax elements you must supply. The description of these elements will be in the contained in the angle brackets. Square brackets are used to show which parts are optional. Basic SELECT query SELECT <field list> FROM <table/query name(s)>
0
8888
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
9401
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
9257
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...
1
9176
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
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
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.