This email is to be read subject to the disclaimer below.
How about something like:
<CFQUERY NAME="GetInit" DATASOURCE="CIS">
SELECT DISTINCT Sur
FROM Customer
WHERE Sur LIKE '#Init#%'
ORDER BY Sur
</CFQUERY>
HTH
Viktor Radnai
Web Developer, National E-Commerce, Ernst & Young
Direct: +61 2 9248 4361
"Andrew Dickinson"
<[EMAIL PROTECTED]> To: "CFAussie Mailing List"
<[EMAIL PROTECTED]>
Sent by: cc:
[EMAIL PROTECTED] Subject: [cfaussie] Parsing and
looping text
mon.com.au
17/03/2003 04:18 PM
Please respond to "CFAussie
Mailing List"
Hopefully this will be easy.
I'm looking to do the following three tasks :
1. Loop through the alphabet, like this
<cfloop INDEX=X FROM='A' TO='Z'>
(but of course index doesn't do this)
2. Parse a letter/string as a parameter e.g.
<a href=filename.cfm?Initial='A'>link</a>
3. Parse an initial into an SQL statement
e.g.
<CFQUERY NAME="GetInit" DATASOURCE="CIS">
SELECT DISTINCT Sur
FROM Customer
WHERE Left(Sur,1) = '#Init#'
ORDER BY Sur
</CFQUERY>
... where Init is a single letter.
I'm puzzled that this query works in Access but not in CF.
Briefly, what I am trying to achieve is the following........
Generate a full alphabetic list, with links, leading to ...........
List of customer surnames starting with each letter, with links, leading
to .......
List of customers all of the same surname.
If anyone thinks I'm wildly offtrack, can you suggest a better approach ?
---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
--------------------
NOTICE - This communication contains information which is confidential and
the copyright of Ernst & Young or a third party.
If you are not the intended recipient of this communication please delete
and destroy all copies and telephone Ernst & Young on 1800 655 717
immediately. If you are the intended recipient of this communication you
should not copy, disclose or distribute this communication without the
authority of Ernst & Young.
Any views expressed in this Communication are those of the individual
sender, except where the sender specifically states them to be the views of
Ernst & Young.
Except as required at law, Ernst & Young does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained nor
that the communication is free of errors, virus, interception or
interference.
Liability limited by the Accountants Scheme, approved under the
Professional Standards Act 1994 (NSW)
--------------------
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/