USE SQL Query THAT WORKS WITH ACCESS.(please test it out before posting the answ
ID: 3836165 • Letter: U
Question
USE SQL Query THAT WORKS WITH ACCESS.(please test it out before posting the answers up)
1) List every member's name in the form last name comma first name (for example: Smith, Bob) and their telephone number sorted alphabetically by name
2) List the first name, last name, and birthday of everyone whose birthday is after July 4, 2005
3) List the first name, last name, and birthday of everyone who was born in the month of November
4) List the first name, last name, and how old they were on January 1, 2000 of everyone who was born before that date
5) List everyone's first name, last name, and area code
6) Give everyone's last name in all uppercase
7) List everyone's first name, last name, and how old they are right now (this query should give the current age whenever it is run, not just on the day of the lab)
Explanation / Answer
1) SELECT LastName+','+FirstName as Name, PhoneNumber from MEMBERS ORDER BY Name
2) SELECT FirstName, LastName,Birthday from MEMBERS where Birthday > #07/04/2005#
3) SELECT FirstName, LastName,Birthday from MEMBERS WHERE MONTH(Birthday) = 11
4) SELECT FirstName, LastName,DateDiff("yyyy",[Birthdate],(01/01/2000))+(Format([Birthdate],"mmdd")>Format((01/01/2000),"mmdd")) as Age from MEMBERS where Birthday > #01/01/2000#
5) SELECT FirstName, LastName, left(PhoneNumber, 3) as AreaCode from MEMBERS
6) SELECT UCASE([LastName]) from MEMBERS
7) SELECT FirstName, LastName,DateDiff("yyyy",[Birthdate],Date())+(Format([Birthdate],"mmdd")>Format(Date(),"mmdd")) as Age from MEMBERS where Birthday > #01/01/2000#
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.