You can do this in your SQL
SELECT People Info
WHERE LastName LIKE 'A%'
This would be for people with last names that start with A.
Kevin
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:13 AM
Subject: Alphabetic List
>
you can use a LIKE '#letter#%' or depending on your DB
use a subscript function
<[EMAIL PROTECTED]> wrote:
Hi,
In Yahoo address book, they have this list for finding a particular
person easily
by the first letter of their last name:
All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Li
A real easy way would be too.
Make a field to store the first letter of the last name.
Grab the first letter, save it to that field, index the field
since you will be searching on it.
Then
SELECT fields
FROM Users
WHERE letter = 'A'
Voila, very quick and effecient.
You can even just add
Do a Query on
SELECT *
FROMDBTable
WHERE LastName LIKE "A%"
You will get all the records which last name start with "A".
Regards,
Cecilia M. Lam
Ektron, Inc.
http://www.ektron.com
[EMAIL PROTECTED]
603-594-2350 ext 211
-Original Message-
From: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
> Hi,
>
> In Yahoo address book, they have this list for finding a particular
> person easily
> by the first letter of their last name:
>
> All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Lists
>
> Does anyone have any insights on how the algorithm of implem
SELECT ID,LastName,Address,etc...
FROM Orgs
WHERE LastName LIKE '#alpha#%'
where the value of alpha is one of the letters of the alphabet
best, paul
At 11:13 AM 1/26/01 -0500, you wrote:
>Hi,
>
>In Yahoo address book, they have this list for finding a particular
>person easily
>by the first
TECTED]]
>Sent: Friday, January 26, 2001 12:27 PM
>To: CF-Talk
>Subject: Re: Alphabetic List
>
>
>You can do this in your SQL
>
>SELECT People Info
>WHERE LastName LIKE 'A%'
>
>This would be for people with last names that start with A.
>
>Kevin
>-
> In Yahoo address book, they have this list for finding a particular
> person easily
> by the first letter of their last name:
>
> All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Lists
>
> Does anyone have any insights on how the algorithm of implementing this
> feature?
>
> For examp
Well, "all" is easy... but if you click, say, "B", on the next page,
SELECT *
FROM Users
WHERE LastName LIKE 'B%'
That should get you all the records where LastName starts with B. Naturally
you'll put in a variable in your query...
WHERE LastName LIKE '#initial#%'
--Scott
- Original Messa
select whatever
from userdatabase
where
lastname like 'A%'
will give you everyone who's last name starts with 'A'.
Regards,
Thomas C.
Office: 01565 757 909
This space for rent
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 26 January 2001 1
Thanks for your replies.
I think I didn't elaborate the question clearly.
What I need is to output the list:
All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Lists
If there are persons last names start with "B", B should be a hot link.
If there is no one's last name starts with "Q",
I would start by coding it this way.
The select statement to create the letters would be:
SELECT DISTINCT upper(left(LastName, 1))
FROM Name
ORDER BY upper(left(LastName, 1))
Then I would look through the resulting query to create the actual links.
The HREF for each letter would have a URL var
y 26, 2001 11:27 AM
To: cf-talk
Cc: schmidt
Subject: Re: Alphabetic List
You can do this in your SQL
SELECT People Info
WHERE LastName LIKE 'A%'
This would be for people with last names that start with A.
Kevin
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF
What would you suggest ?? :-)
Justin
>-Original Message-
>From: Jeremy Allen [mailto:[EMAIL PROTECTED]]
>Sent: Friday, January 26, 2001 4:36 PM
>To: CF-Talk
>Subject: RE: Alphabetic List
>
>
>I would recommend against using this method
>even if the field
Do a search on LName like "B%" and
BB
Regards,
Cecilia M. Lam
Ektron, Inc.
http://www.ektron.com
[EMAIL PROTECTED]
603-594-2350 ext 211
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:42 AM
To: CF-Talk
Subject: Re:
Are all the records on the same page or do you want them to go to a seperate
page for each listing
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 10:41 AM
Subject: Re: Alphabetic List
> Thank
lto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:42 AM
To: CF-Talk
Subject: Re: Alphabetic List
Thanks for your replies.
I think I didn't elaborate the question clearly.
What I need is to output the list:
All - A B C D E F G H I J K L M N O P Q R S T U V W X Y Z - Lists
If there are
variable. Then when looping on
A to Z, do a ListFind on your app variable to see if that letter shows up.
- Original Message -
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, January 26, 2001 9:41 AM
Subject: Re: Alphabetic List
> Thanks fo
ame,1 to
asc(max(upper(left(lastname,1 grouping on numbers/special signs.
Michel Vuijlsteke
Netpoint NV
> -Original Message-
> From: Russel Madere [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 5:50 PM
> To: CF-Talk
> Subject: RE: Alphabetic List
>
&g
Grr... I just saw Russel's reply and had completely glossed over the
DISTINCT idea... that would alleviate the 'too dang big valuelist result'
issue :)
--Scott
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.
etter)#
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 11:42 AM
To: CF-Talk
Subject: Re: Alphabetic List
Thanks for your replies.
I think I didn't elaborate the question clearly.
What I need is to output the list:
All - A B C D E F G H
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 26, 2001 9:42 AM
To: CF-Talk
Subject: Re: Alphabetic List
Thanks for your replies.
I think I didn't elaborate the question clearly.
What I need is to output the list:
All - A B C D E F G H I
Small bug in my code...forgot the anchor name in the link. Change the line
that reads:
#t1.init#
to:
#t1.init#
-Original Message-
From: Brian Flynn
Sent: Friday, January 26, 2001 1:45 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Alphabetic List
Here's some co
*
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: 26 January 2001 16:42
> To: CF-Talk
> Subject: Re: Alphabetic List
>
>
> Thanks for your replies.
>
>
> Thanks!
>
> Hong
>
greatly
>degrade as it is used a lot and as the table
>grows in size.
>
>Jeremy Allen
>elliptIQ Inc.
>
> >-Original Message-
> >From: Kevin Schmidt [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, January 26, 2001 12:27 PM
> >To: CF-Talk
> >
You mean something like:
Click a letter to list
Yellow Page Headings that begin with it:#VARIABLES.INIT#/CD.#URL.CFI#/CN.#URL.CFT#/AL.A.htm>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z >Search
Basics
best, paul
At 11:41 AM 1/26/01 -0500, you wrote:
>Thanks
structure then you just display
the letter and no link... :)
Jeremy Allen
elliptIQ Inc.
>-Original Message-
>From: JustinMacCarthy [mailto:[EMAIL PROTECTED]]
>Sent: Friday, January 26, 2001 12:28 PM
>To: CF-Talk
>Subject: RE: Alphabetic List
>
>
>What would you sug
r eats you.
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 10:42
> To: CF-Talk
> Subject: Re: Alphabetic List
>
>
> Thanks for your replies.
>
>
>
>
>
>
>#chr(letter)#
>
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 26, 2001 11:42 AM
> To: CF-Talk
> Subject: Re: Alphabetic List
>
> Thanks for your repl
o: CF-Talk
Subject: Re: Alphabetic List
You mean something like:
Click a letter to list
Yellow Page Headings that begin with it:#VARIABLES.INIT#/CD.#URL.CFI#/CN.#URL.CFT#/A
L.A.htm>A B<
/A> C<
/A> D<
/A> E<
/A> F<
/A> G<
/A> H<
/A> I<
/A>
This is not as fast as:
WHERE lname LIKE 'A%'
when the "lname" column is indexed.
best, paul
At 01:53 PM 1/26/01 -0500, you wrote:
>Or do a query and on the last name field
>do where lname = Lower(Left(LName, 1)) = 'letter'
~~
Structure your
>
>
>
>
> #s#
>
> #s#
>
>
Actually, adjusting my previous code to make it faster -
Contains is much faster than any List commands...
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 868
32 matches
Mail list logo