am stumbling over the synatx-logic of this simple sql statment.
I have an Access database with the following two text fields...
SiteSumm_Area1
SiteSumm_Area2
How do I craft an SQL query that will deliver for me a set of records in which the above fields for a particular record do not match a particular string...
I have tried the following two codes with no luck.
The first does not deliver the complete set of records and the second delivers a syntax error...
I look forward to your guidance.
Code Try #1
<CFQUERY NAME="SortNoMatch_list" DATASOURCE="#request.SiteDSN#">
SELECT *
FROM SummaryList
WHERE (Summ_Area1 <> '#url.SortKey#') AND (Summ_Area2 <> '#url.SortKey#')
</CFQUERY>
Code Try #2
<CFQUERY NAME="SortNoMatch_list" DATASOURCE="#request.SiteDSN#">
SELECT *
FROM SummaryList
WHERE (Summ_Area1 AND Summ_Area2) <> '#url.SortKey#'
</CFQUERY>
I have an Access database with the following two text fields...
SiteSumm_Area1
SiteSumm_Area2
How do I craft an SQL query that will deliver for me a set of records in which the above fields for a particular record do not match a particular string...
I have tried the following two codes with no luck.
The first does not deliver the complete set of records and the second delivers a syntax error...
I look forward to your guidance.
Code Try #1
<CFQUERY NAME="SortNoMatch_list" DATASOURCE="#request.SiteDSN#">
SELECT *
FROM SummaryList
WHERE (Summ_Area1 <> '#url.SortKey#') AND (Summ_Area2 <> '#url.SortKey#')
</CFQUERY>
Code Try #2
<CFQUERY NAME="SortNoMatch_list" DATASOURCE="#request.SiteDSN#">
SELECT *
FROM SummaryList
WHERE (Summ_Area1 AND Summ_Area2) <> '#url.SortKey#'
</CFQUERY>