Guys this is my working query...

<cfquery name="sites_data" datasource="data">
        SELECT id, site, far_end, site_type, phase, lat, long, cluster AS 
clust, city, region, sites_status
        FROM sites
        WHERE site IS NOT NULL
            <cfif IsDefined("form.site") AND form.site IS NOT ''>AND siteID1 
= '#UCASE(Rereplacenocase(form.site,"-| ","","ALL"))#'</cfif>
            <cfif IsDefined("form.farend") AND form.farend IS NOT ''>AND 
siteID2 = '#UCASE(Rereplacenocase(form.farend,"-| ","","ALL"))#'</cfif>
            <cfif IsDefined("form.tos") AND form.tos IS NOT '' AND form.tos 
IS NOT '0'>AND site_type = #form.tos#</cfif>
            <cfif IsDefined("form.region") AND form.region IS NOT '' AND 
form.region IS NOT '0'>AND region = #form.region#</cfif>
            <cfif IsDefined("form.cluster") AND form.cluster IS NOT '' AND 
form.cluster IS NOT '0'>AND cluster = #form.cluster#</cfif>
            <cfif IsDefined("form.phase") AND form.phase IS NOT '' AND 
form.phase IS NOT '0'>AND phase = #form.phase#</cfif>
            <cfif IsDefined("form.city") AND form.city IS NOT '' AND 
form.city IS NOT '0'>AND city = #form.city#</cfif>
        ORDER BY region
</cfquery>


now if I add 'GROUP BY clust' then it gives an error.
The cluster field is Integer.


Regards,
Arsalan


--------------------------------------------------
From: "Phillip Vector" <[email protected]>
Sent: Monday, June 15, 2009 8:40 PM
To: "cf-talk" <[email protected]>
Subject: Re: Case Sensitive SQL

>
> On Mon, Jun 15, 2009 at 7:33 AM, Claude
> Schneegans<[email protected]> wrote:
>>
>>  >>MS Access is fine for basic office use, but for web apps you're
>> better off picking Derby, H2, MySQL, Postgres, etc - or one of the free
>> 'Express' editions of Oracle or MS SQL Server.
>>
>> Legend, pure urban legend !
>
> Ok.. So you disagree that Access is a low choice for web apps?
>
>> Access applications have a bad reputation,
>
> Gotcha. You think access is a good web app then?
>
>> but do not forget that
>> accessing an Access database through ODBC or JDBC
>> under CF IS NOT an Access application: it is a CF application.
>> Do not mistake the database file with the VBscript application that may
>> be embedded in the file.
>
> Most of the arguments I have for not using access on any web app has
> nothing to do with the VB Scripting of said file.
>
> and you mentioning that accessing it through ODBC or JDBC is not an
> access application... So you are defeating your point at the top.
>
> There is very few reasons why you would want a Web App with Access.
> None of them that I can think of would be useful in a web app that is
> worked on by 2 or more people (which most web apps are).
>
> I really can't understand the "fanboy" attitude people have for
> access. There's so many things out there that are better. Heck, if
> Microsoft thought access was the end all, be all, we wouldn't have
> MS-SQL.
>
> If Microsoft won't stand behind their product as being a full
> database, then why do other people do
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323509
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to