Viewing 5 posts - 106 through 110 (of 110 total)
SELECT A.PostCode, A.[Count],
A.Suburb, B.Latitude, B.Longitude
FROM (SELECT Z.Postcode, Suburb = MIN(Z.Suburb),
[Count] = (SELECT COUNT(*) FROM #tblMembers Y WHERE Y.Postcode = Z.Postcode)
FROM #tblPostcodes Z GROUP BY Z.PostCode) A
...
April 10, 2007 at 11:06 pm
SELECT A.PostCode, [Count] = (SELECT COUNT(*) FROM tblMembers Z WHERE Z.Postcode = A.Postcode),
A.Suburb, B.Latitude, B.Longitude
FROM (SELECT Z.Postcode, Suburb = MIN(Z.Suburb) FROM tblPostcodes Z GROUP BY Z.PostCode) A
INNER...
April 10, 2007 at 8:32 pm
Hi,
[DateEntered] BETWEEN (( YEAR([DateEntered]) = 2006 AND MONTH([DateEntered]) =12 AND DAY([DateEntered]) = 12)
AND ( YEAR([DateEntered]) = 2007 AND MONTH([DateEntered]) = 12 AND DAY([DateEntered]) = 12))
should say
[DateEntered] BETWEEN '20061212' AND...
April 10, 2007 at 1:20 am
Try
SELECT A.AreaCode, A.AreaName,
A.AreaCode * 100 + (SELECT COUNT(*) FROM tablename Z WHERE Z.AreaCode = A.AreaCode AND Z.AreaName <= A.AreaName)
FROM tablename A
ORDER BY A.AreaCode, A.AreaName
K. Matsumura
April 8, 2007 at 11:28 pm
Hello,
If you prefre not to use an intermediate table, try this:
SELECT c.course_id, c.course_title, i.instructor_id, i.instructor_name
FROM courses c
INNER JOIN roster r on c.course_id = r.course_id
and r.instructor_id = (SELECT MAX(Z.instructor_id) FROM...
March 28, 2007 at 9:22 pm
Viewing 5 posts - 106 through 110 (of 110 total)