Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Need guidance on an SQL problem

inbinb Member Posts: 15
Hi, I'm taking my first and only SQL course (just trying to get my degree as I prefer network administration and loathe any type of programming per se) and I have the following problem.

If I have the 4 tables that I created in MS Access and have populated with information, for instance,

Table: Emp_Info
SSN -primary key
Emp_Name
Address
Telephone
Email
Job_Title_Code
Dept_ID
Hire_Date
Salary

Table: Job_Title_Info
Job_Title_Code -primary key
Job_Title
Exempt
Non-Exempt
Min_Salary
Max_Salary

Table: Dept_Info
Dept_ID -primary key
Dept_Name
Dept_Location
Dept_Head

What I want to do is
Write three SQL queries:

The first query joins two tables in the above example database and uses BETWEEN to restrict record selection.

The second query joins two tables in the above example database and uses LIKE to restrict record selection.

The third query uses UNION to join two of the tables

Now, I can do the query in MS Access but is there a way to convert that into SQL within the MS Access application? How would the SQL query be written if there is no conversion?

Thanks.

Comments

  • bannambannam Member Posts: 2
    : Hi, I'm taking my first and only SQL course (just trying to get my degree as I prefer network administration and loathe any type of programming per se) and I have the following problem.
    :
    : If I have the 4 tables that I created in MS Access and have populated with information, for instance,
    :
    : What I want to do is
    : Write three SQL queries:
    :

    :
    : Now, I can do the query in MS Access but is there a way to convert that into SQL within the MS Access application? How would the SQL query be written if there is no conversion?
    :
    : Thanks.
    :

    I too am a new to SQL but I have found that by writing the query in access I can then change to the SQL view and see the SQL code. I then cut and paste that into mySQL. It needs just a little tweaking sometimes but it helps me get the general format put together quickly.

    Top get to the SQL view just click on teh (probably first button on teh tool bar) views button. the drop down arrow gives you choices on datasheet view, SQL view, graph views, etc.

    Hope it helps. My use of this has been to create pass thru queries in mySQl via VB and by doing it first in access then getting the SQL it helps me figure out the format.


Sign In or Register to comment.