I have code I use which does this combination of CF and SQL
Select *,substr(Lastname,1,1) as Letter
from users order by Lastname ASC, Firstname ASC
<cfoutput query="Above" group="letter">
<h1>#letter#</h1>
<cfoutput>
<li>#lastname#,#firstname#
</cfoutput>
</cfoutput>
HTH
-dov
-----Original Message-----
From: Deanna Schneider [mailto:[EMAIL PROTECTED]
Sent: Monday, November 15, 2004 10:25 AM
To: CF-Talk
Subject: Re: Find first letter
You know, this is the kind of thing that you can probably do in your
database, too. So, that you pass back a column with the full last name
and one with the first letter. Don't know your DB, so I can't give you
any syntax. But, I just did this with Oracle, and it's a piece of cake.
----- Original Message -----
From: "Robert Orlini" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, November 15, 2004 9:03 AM
Subject: Find first letter
>I need to output a list of names alphabetically via the field
>"employee_lname" (last name).
>
> What's the code that can check the first letter of the field
> employee_lname?
>
> Thanks.
>
> Robert O.
> HWW
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184275
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54