sure, the IN and NOT IN clauses are much faster than using multiple ANDs,
but don't transfer the load to CF - allow the DB to do what it's best at...
cfquery name=qCrop datasource=common_as
SELECT DISTINCT Description
FROMVCT
WHERE description NOT IN
You could create a SPROC to do it like this.
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE getDescriptions()
AS
SET NOCOUNT ON
SELECT DISTINCT
description
FROM vct
WHERE description
NOT IN (
'ANISE', 'APPLES', 'ASPARAGUS', 'BEETS', 'BROCCOLI'
)
ORDER BY
something FROM SomethingElse)
ORDER BY Description
chris
-Original Message-
From: Bryan Love [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:42 AM
To: CF-Talk
Subject: RE: SQL Question - Could CF make this easier?
sure, the IN and NOT IN clauses are much faster than using multiple
Or, if possible, add a field to the vct file for include/exclude...
ô¿ô Tony
-Original Message-
From: Jillian Carroll [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 11, 2003 11:37 AM
To: CF-Talk
Subject: SOT: SQL Question - Could CF make this easier?
I am creating a drop-down list of
4 matches
Mail list logo