Microsoft Access query

misterIT

n00b
Joined
Dec 14, 2014
Messages
3
Hi,
I am working at a Microsoft Access Database and I have some trouble with sort commands in SQL view en query Design.

I need at sort with the following Data:
List with firstname, Lastname and department. Sorted on Lastname and inside with Surename.
Also I Need a sorted list with a view of the First- and surnames of the employees from 65 years old.
The last sort is a view with country and region sorted by region and inside with country.

I hope for some help
 
Dear MisterIT,

I think that I can help you with that problem. You can use the sort in Microsoft Access.

Example in SQL view:
SELECT column_name,column_name
FROM table_name
ORDER BY column_name,column_name ASC|DESC; (ascending (up) descending (down))

Example for COUNT in SQL view:
SELECT (department), COUNT(+ / - *) AS (Employees) FROM (Employees)
GROUP BY (department)

Example for view country and region in SQL view:
SELECT (Regiondescription, CountryDescription)
FROM Countrys(join Region R)
ON (regionID = countryID
GROUP BY RegionDescription, Countrydescription

I hope that the examples are clear for you. Also you can send me a mail if you want more. At the moment I am working for the client with other things they want from my database. For the fun here some things from my work.
SELECT First, Lastname
FROM Emp
WHERE Birth <DATEADD(year, -(number), getdate())

SELECT
FROM Emp E (Innerjoin 3)\
WHERE (E.Department) = " * "
ORDER BY (E.EmpID, R.RegiDes)
 
Back
Top