TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
David Smith
NA
2k
0
Join two SQL queries in Access 2007
Jul 29 2012 6:33 AM
Can some help me combine this two queries into one sql, I am using Access 2007 at the moment. Basically SQL 2 below is going to return a dataset
Then when I call SQL 1, I have to Left Join from the dataset return from SQL 2, Can someone help
SQL 1
Select tblContact.ContactID, tblContact.FirstName, tblContact.LastName,
FROM (tblContact INNER JOIN
tblContactType ON tblContact.ContactID = tblContactType.ContactID)
SQL 2
(TRANSFORM First(tblContactType.ContactType) AS FirstOfContactType
SELECT tblContactType.ContactID, First(tblContactType.ContactStatus) AS ContactStatus, COUNT(tblContactType.ContactType) AS Count
FROM (tblContact INNER JOIN
tblContactType ON tblContact.ContactID = tblContactType.ContactID)
GROUP BY tblContactType.ContactId
Pivot 'ContactType')
Reply
Answers (
0
)
Index Data Structures in SQL
how to update more than two columns of one table depending upon different value of another table??