Aaron Rouse wrote:
He wants it when the ucDescription contains that value and is not just equal
to it or was that a typo in his CFIF? The case when then method may not
work depending on what DB he is using and the version of it.
Use a CASE statement in your SQL...
cfquery
I know it has broad support but just felt that disclaimer should be put in
since never know what someone is using on here. I'd never put it past a
single person to be using Access for example but heck they could even be
using an old FoxPro system just never do know. My primary point though was
I would recommend Jim's suggestion, with a slight modification.
Since he wanted ucDescription contains Graduate Certificate, I think in SQL
Server that would be LIKE
Anyway try this.
cfquery datasource=computedColumnTest name=testquery
SELECT ucDescription, ucTitle,
CASE WHEN ucDescription LIKE
Hi,
Thanks for you patience. ;) Ben was right about my confusion (I knew it
didn't feel correct but...you know). Anyhow, I've been taking up Jim's
suggestion and applied the correct MSSQL (we're using version 8) syntax.
It runs now, but as mentioned before, because of then WHEN statement,
the
Hi all,
Here's the deal. I need to order a query by a particular sequence that is not
in the database, nor can it be implemented in the database (the data is
imported daily from a third party which does not provide this sequence). So,
the solution my co-worker came up with is to actually
-Talk
Subject: CFIF statement in query
Hi all,
Here's the deal. I need to order a query by a particular sequence that is
not in the database, nor can it be implemented in the database (the data is
imported daily from a third party which does not provide this sequence). So,
the solution my co-worker
Adrian Wagner wrote:
Hi all,
Here's the deal. I need to order a query by a particular sequence that is not
in the database, nor can it be implemented in the database (the data is
imported daily from a third party which does not provide this sequence). So,
the solution my co-worker came
He wants it when the ucDescription contains that value and is not just equal
to it or was that a typo in his CFIF? The case when then method may not
work depending on what DB he is using and the version of it.
On 10/3/06, Jim Wright [EMAIL PROTECTED] wrote:
Adrian Wagner wrote:
Use a CASE
Another way to do the same thing if you dont want to put a IF
statement in the SQL (which is the better way to do it but just
suppose you dont want to do that) you coudl do something like this:
cfif ucDescription contains 'Graduate Certificate'
cfquery datasource=computedColumnTest
No typo. We're using an SQL Server 8.
[EMAIL PROTECTED] 4/10/2006 12:28 pm
He wants it when the ucDescription contains that value and is not just
equal
to it or was that a typo in his CFIF? The case when then method may
not
work depending on what DB he is using and the version of it.
On
10 matches
Mail list logo