This is code I use.
CFSET LIST = "2,1,6,3,2,99,5,2,1,4,1,1"
CFSET UNIQUE_LIST =
REReplace(ListSort(LIST,"Numeric"),"([^,])(,\1)*","\1","ALL")
CFOUTPUT#UNIQUE_LIST#/CFOUTPUT
In order to sort text, just change Numeric to TextNoCase.
use the Select Distinct option thats in SQL?
Select Distinct COl1,Col2,...etc from My_Table where x=y
Jason Lees
National Express Ltd
E-Mail : [EMAIL PROTECTED]
-Original Message-
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: 27 February 2001 14:19
To: CF-Talk
Subject: Removing
--Original Message-
From: Jason Lees (National Express)
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 7:31 AM
To: CF-Talk
Subject: RE: Removing Duplicate Values in a List
use the Select Distinct option thats in SQL?
Select Distinct COl1,Col2,...etc from My_Table where x=
Use SELECT DISTINCT .
Britta Wingenroth
West Coast Web
- Original Message -
From: "Jason Larson" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 6:18 AM
Subject: Removing Duplicate Values in a List
I have a List that is generated from a query, How
FROMPhotos
ORDER BY Keywords
/cfquery
cfset KeywordList = ValueList(Keywords.Keywords)
Craig
-Original Message-
From: Jason Larson [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:05 AM
To: CF-Talk
Subject: RE: Removing Dupli
ECTED]
-Original Message-
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: 27 February 2001 15:05
To: CF-Talk
Subject: RE: Removing Duplicate Values in a List
I've have tried this and it doesn't work. Here's a little better
explaination.
cfquery name="Keywords" datasource=&q
cated. Also might as well let the engine sort them as well.
- Original Message -
From: "Jason Larson" [EMAIL PROTECTED]
To: "CF-Talk" [EMAIL PROTECTED]
Sent: Tuesday, February 27, 2001 8:05 AM
Subject: RE: Removing Duplicate Values in a List
I've have tried this and it d
Then in the Query, can you use the DISTINCT function?
That way there is no duplicates.
-Original Message-
From: Jason Larson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:05 AM
To: CF-Talk
Subject: RE: Removing Duplicate Values in a List
I've have tried
Actually, it is telling you that you need to make your query return exactly
what you want.
YES, using Distinct or Unique will work, but it is not the best way to get
what you want out of the data.
Distinct is shortcut to effectively grouping your results...
or:
"The DISTINCT keyword sorts the
CTED]]
Sent: Tuesday, February 27, 2001 10:05 AM
To: CF-Talk
Subject: RE: Removing Duplicate Values in a List
I've have tried this and it doesn't work. Here's a little better
explaination.
cfquery name="Keywords" datasource="#DS#" username="#DSUsername#"
password=&qu
e is in Access, for some reason the DISTINCT Function doesn't work
with a column that is populated with a list.
Thanks for all your feedback
Jason Larson
[EMAIL PROTECTED]
-Original Message-
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 8:35 AM
To: CF-Ta
CFQUERY DATASOURCE="..." NAME="GetKeywords"...
SELECT DISTINCT Keywords
FROM Photos
ORDER BY Keywords
/CFQUERY
CFSET variables.UniqueList = ValueList(GetKeywords, Keywords)
should work
--
Aidan Whitehall [EMAIL PROTECTED]
Netshopper UK Ltd
Advanced Web Solutions Services
12 matches
Mail list logo