--------------7A4281627B5406338C32D0EA
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Thanks it worked. I put the SQL query together like this:
<cfquery datasource=#global.DatasourceName# NAME="QryPreceptors">
SELECT ID, title, first, last, credentials, email_address, Left(last, 1) AS alphalname
FROM preceptors
<cfif Criteria NEQ ''>
WHERE #PreserveSingleQuotes(Criteria)#</cfif>
ORDER BY last, first
</cfquery>
This worked and I used the CFquery to group them. I thought I needed to have orderby
alphalname on there but it throws an error. It will not let me sort on the alias for
some reason.
But CF displays it right when I sort by last name anyway. Maybe it will be different
when I switch to SQL server.
Thanks again.
[EMAIL PROTECTED] wrote:
> Joseph,
>
> If you do a
>
> SELECT Right(textfield,(Len(textfield)-1)) AS name
> FROM .....
>
> You can select all but the first character of a field value.
>
> Alternatively you can
>
> SELECT Left(textfield, 1) AS name
> FROM ...
>
> and just get the first character.
>
> Hope that's what you had in mind.
>
> Kevin
>
> --------------------------
> Kevin Marshall
> Web Application Developer
> eCalton.com, Inc.
> Vero Beach, FL
> www.ecalton.com
> [EMAIL PROTECTED]
> 561.569.4500
>
>
> "Joseph
> Higgins" To: Fusebox <[EMAIL PROTECTED]>
> <higgjose@isu cc:
> .edu> Subject: SQL or CF to do an
>alphabetical list
>
> 11/11/00
> 05:15 PM
> Please
> respond to
> fusebox
>
>
>
> Does anyone know of an ACCESS sql function that will strip off the first =
> character of a string so that you can group output alphabetically?
>
> ------------------------------------------------------------------------------
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
--
Joseph Higgins, BSN, RN
Clinical Faculty, Instructional Technologist
Idaho State University, Department of Nursing
650 Memorial Dr.
Pocatello, ID 83209-8101
Phone: (208) 282-2984
Fax: (208) 282-4476
Email: [EMAIL PROTECTED]
Home:
816 Gloria
Chubbuck, ID 83202
Home Phone: (208) 237-8767
--------------7A4281627B5406338C32D0EA
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Thanks it worked. I put the SQL query together like this:
<br><cfquery datasource=#global.DatasourceName# NAME="QryPreceptors">
<br>SELECT ID, title, first, last, credentials, email_address, Left(last,
1) AS alphalname
<br>FROM preceptors
<br><cfif Criteria NEQ ''>
<br>WHERE #PreserveSingleQuotes(Criteria)#</cfif>
<br>ORDER BY last, first
<br></cfquery>
<p>This worked and I used the CFquery to group them. I thought I needed
to have orderby alphalname on there but it throws an error. It will not
let me sort on the alias for some reason. But CF displays it right when
I sort by last name anyway. Maybe it will be different when I switch to
SQL server.
<p>Thanks again.
<p>[EMAIL PROTECTED] wrote:
<blockquote TYPE=CITE>Joseph,
<p>If you do a
<p>SELECT Right(textfield,(Len(textfield)-1)) AS name
<br>FROM .....
<p>You can select all but the first character of a field value.
<p>Alternatively you can
<p>SELECT Left(textfield, 1) AS name
<br>FROM ...
<p>and just get the first character.
<p>Hope that's what you had in mind.
<p>Kevin
<p>--------------------------
<br>Kevin Marshall
<br>Web Application Developer
<br>eCalton.com, Inc.
<br>Vero Beach, FL
<br>www.ecalton.com
<br>[EMAIL PROTECTED]
<br>561.569.4500
<br>
<p>
"Joseph
<br>
Higgins"
To: Fusebox <[EMAIL PROTECTED]>
<br>
<higgjose@isu cc:
<br>
.edu>
Subject: SQL or CF to do an alphabetical list
<p>
11/11/00
<br>
05:15 PM
<br>
Please
<br>
respond to
<br>
fusebox
<br>
<br>
<p>Does anyone know of an ACCESS sql function that will strip off the first
=
<br>character of a string so that you can group output alphabetically?
<p>------------------------------------------------------------------------------
<br>To Unsubscribe visit <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.</blockquote>
<p>--
<br>Joseph Higgins, BSN, RN
<br>Clinical Faculty, Instructional Technologist
<br>Idaho State University, Department of Nursing
<br>650 Memorial Dr.
<br>Pocatello, ID 83209-8101
<br>Phone: (208) 282-2984
<br>Fax: (208) 282-4476
<br>Email: [EMAIL PROTECTED]
<br>Home:
<br>816 Gloria
<br>Chubbuck, ID 83202
<br>Home Phone: (208) 237-8767
<br> </html>
--------------7A4281627B5406338C32D0EA--
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.