You could try:
SELECT count(*) as rCount,
UPPER(left(last_Name,1)) as letter
FROM myTable
WHERE 1 > 0
GROUP by UPPER(left(last_name,1))
ORDER by letter
HTH,
Chris
----------------------------------------------
Original Message
From: "Jeff"<[EMAIL PROTECTED]>
Subject: Okay, what's the first part of those alphabetical navigation
strips?
Date: Fri, 29 Aug 2003 10:15:34 -0400
>Alright, the second part of it's easy enough to figure out, "select all
from
>table, where last_name starts with #letter# (passed from previous page)"
>
>But I've seen ones where the letters are links only if they have an entry
in
>the database. In other words, there's nobody with a last name starting with
>X, so X isn't a link, but S is.
>
>What's the secret to looping over your initial "select * from table" query
>and seeing if there's an entry that starts with that letter?
>
>
>A | B | C | D | E |
>^ ^ ^
>
>I think I'm feelin' it, but it's just not quite there.
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Get the mailserver that powers this list at
http://www.coolfusion.com