On 10/3/06, Dave Watts [EMAIL PROTECTED] wrote:
...
I don't think it matters that much one way or the other. I simply think we
should be more careful about how we define best practices generally.
Nothing /really/ matters. In the long run. ;-)
I would think that best practice depends on how
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
HA! Maybe it was a bad install too so how can we check for the existance of
cfif? h
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:16 PM
To: CF-Talk
Subject: Re: CFIF Statement
Are you insane? I am just supposed to assume
for the existance
of
cfif? h
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:16 PM
To: CF-Talk
Subject: Re: CFIF Statement
Are you insane? I am just supposed to assume that getitem exists and that
it is a query and that itemvalue
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
PROTECTED]
Sent: Wednesday, October 04, 2006 9:14 AM
To: CF-Talk
Subject: Re: CFIF Statement
Oh, I am sure with a little Java we could somehow check for existance of CF
tags which brings up a good point, what if some rogue developer somehow
removed tags from the language ;)
On 10/4/06, Bobby
ways of
validating whether or not qry.record is 0 or something other than...
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 04, 2006 9:14 AM
To: CF-Talk
Subject: Re: CFIF Statement
Oh, I am sure with a little Java we could somehow check
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
On 10/3/06, Mark Henderson wrote:
I could be mistaken, but hasn't that been the crux of most of this
debate?
Then Aaron Rouse wrote:
Sorry, figured it was obvious that I was just beating a dead
horse and being sarcastic
Ditto (hence the 1 liner). I guess my communication skills need a
Or maybe we need some sarcasm tags or how about a IsSarcasm UDF
On 10/4/06, Mark Henderson [EMAIL PROTECTED] wrote:
On 10/3/06, Mark Henderson wrote:
I could be mistaken, but hasn't that been the crux of most of this
debate?
Then Aaron Rouse wrote:
Sorry, figured it was obvious that
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
I'm all full up at the moment, an unambiguous and unfailing beerIs()
proves more difficult than I first estimated... I'm sure I'll be done
real soon now tho, and then it's ON!
*cough*rightAfterCoffee*cough*
On 10/4/06, Aaron Rouse [EMAIL PROTECTED] wrote:
Or maybe we need some sarcasm tags or
Aaron Rouse wrote:
Or maybe we need some sarcasm tags or how about a IsSarcasm UDF
Ai, and the sarcasm tags seem to be working well enough in other
threads. Sometimes it's more fun, as they say, to leave these things as
an exercise for the reader. Besides, a little ambiguity reveals
something
I think my point is that, sometimes, beer *is*, even if we can't prove it.
I'm not sure what that means, but I get the feeling, that if I could see it
clearly,
I would grok it impossibly fast, knowing in an instant, the state of all
beer in
the system. Except for that beer that I'm pretty sure
time...lol.
-Original Message-
From: Denny Valliant
To: CF-Talk
Sent: 03/10/2006 03:08
Subject: Re: CFIF Statement
On 10/2/06, Dave Watts [EMAIL PROTECTED] wrote:
Sorry so wordy with so little clarity, probably, but I'll use
this example, that I think Neil might have given
Alright, round two.
How about:
cfif isQuery(qryName) and isBoolean(qryName.recordcount) and yesNoFormat(
qryName.recordcount)
code ...
/cfif
Is it a query, is the value a boolean type definition and now convert the
number to a logical Yes or 'No to be evaluated.
This is overkill but
'.
-Original Message-
From: Teddy Payne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 10:17 AM
To: CF-Talk
Subject: Re: CFIF Statement
Alright, round two.
How about:
cfif isQuery(qryName) and isBoolean(qryName.recordcount) and yesNoFormat(
qryName.recordcount)
. code ...
/cfif
Message-
From: Douglas Knudsen [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 01, 2006 9:42 PM
To: CF-Talk
Subject: Re: CFIF Statement
agreed. Note that folks in JS land use this all the time.
if( document.someobject )
IIRC, can use in Java toooh and AS.
DK
On 10/1/06, Dave Watts [EMAIL
they generally work out to 0 being false and =1 is true.
Actually 0 or null in Javascript is false and not false is true then
0 is also true.
True and false got to be mutually exclusive.
~|
Introducing the Fusion Authority
cfif isQuery(qryName) and isBoolean(qryName.recordcount) and
yesNoFormat(
qryName.recordcount)
May be start the expression with
server.coldfusion.productName EQ ColdFusion Server AND ...
just to make sure ;-)
~|
Introducing
LOL!
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:18 AM
To: CF-Talk
Subject: Re: CFIF Statement
cfif isQuery(qryName) and isBoolean(qryName.recordcount) and
yesNoFormat(
qryName.recordcount)
May be start the expression
And what if qryName does not even exist? Should it not start off with a:
StructKeyExists(VARIABLES, qryName) After we know it exists and we know
it is a query then we can assume recordcount exists and do the boolean
checks.
On 10/3/06, Teddy Payne [EMAIL PROTECTED] wrote:
Alright, round two.
-Talk
Sent: Tue Oct 03 16:18:25 2006
Subject: Re: CFIF Statement
cfif isQuery(qryName) and isBoolean(qryName.recordcount) and
yesNoFormat(
qryName.recordcount)
May be start the expression with
server.coldfusion.productName EQ ColdFusion Server AND ...
just to make sure
Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:52 AM
To: CF-Talk
Subject: Re: CFIF Statement
And what if qryName does not even exist? Should it not start off with a:
StructKeyExists(VARIABLES, qryName) After we know it exists and we know
PROTECTED]
Sent: Tuesday, October 03, 2006 11:52 AM
To: CF-Talk
Subject: Re: CFIF Statement
And what if qryName does not even exist? Should it not start off with
a:
StructKeyExists(VARIABLES, qryName) After we know it exists and we
know
it is a query then we can assume recordcount
.
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:52 AM
To: CF-Talk
Subject: Re: CFIF Statement
And what if qryName does not even exist? Should it not start off with
a:
StructKeyExists(VARIABLES, qryName) After we
to whatever
the starting defaults are for the form.
-Original Message-
From: Teddy Payne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 3:18 PM
To: CF-Talk
Subject: Re: CFIF Statement
If a query does not exist, I have seen a common implementation that you
build a query
Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 11:52 AM
To: CF-Talk
Subject: Re: CFIF Statement
And what if qryName does not even exist? Should it not start off
with
a:
StructKeyExists(VARIABLES, qryName) After we know
-
From: Teddy Payne [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 3:18 PM
To: CF-Talk
Subject: Re: CFIF Statement
If a query does not exist, I have seen a common implementation that you
build a query with the same columns names as you would expect from the
query
anyway, rather it should be off in a friendly little DAO CFC, but you get
the idea.
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 3:29 PM
To: CF-Talk
Subject: Re: CFIF Statement
Makes sense, I was thinking of pages other than forms
if it exists, then I know I am on an edit or view
page and to output the query, the other side would be to create a blank
query to leave the form blank,
Actually, you don't have give you all this trouble.
In all my edit templates, I transmit the id of the record I want to work on.
When adding a
Very nice.
I like that a lot and will be stealing it in the future :)
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 4:15 PM
To: CF-Talk
Subject: Re: CFIF Statement
if it exists, then I know I am on an edit or view
page
Simple.
You may only want to run the query if a specific variable exists, such as a
form field, or a fuseaction.
--
Snake
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: 03 October 2006 20:27
To: CF-Talk
Subject: Re: CFIF Statement
I have seen this done before
Ditto
-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 03, 2006 4:15 PM
To: CF-Talk
Subject: Re: CFIF Statement
if it exists, then I know I am on an edit or view
page and to output the query, the other side would be to create a blank
query
This is how our POS inhouse RAD tool works for the CRUD screens. I
personally tend to stray away on forms built outside of it to some degree.
The reason is sometimes we want default values on a create screen.
On 10/3/06, Claude Schneegans [EMAIL PROTECTED] wrote:
if it exists, then I know I am
if a specific variable exists, such as
a
form field, or a fuseaction.
--
Snake
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: 03 October 2006 20:27
To: CF-Talk
Subject: Re: CFIF Statement
I have seen this done before as well but it still does not answer my
question
fails.
I then just call my DAO with the same action when the form is submitted and
it will either do an insert or update query.
Russ
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: 04 October 2006 00:05
To: CF-Talk
Subject: Re: CFIF Statement
But then you want to only
(in itself wrong), one was true-er
than the other?just not the one everyone knew it to be ;-) maybe
this is cf-community time...lol.
-Original Message-
From: Denny Valliant
To: CF-Talk
Sent: 03/10/2006 03:08
Subject: Re: CFIF Statement
On 10/2/06, Dave Watts [EMAIL PROTECTED
I'm with Neil on this one. Don't we usually try to do things
as correct as possible? Just because CF sees 23 as a
boolean true doesn't mean we should use that as a shortcut.
CF is a typeless language, isn't it? We rely on implicit casting all the
time. What makes this any different?
Dave
I've taken way too many shots to the head to debate this with you. I'm sure
you're right, but I just don't see it yet.
On 10/3/06, Dave Watts [EMAIL PROTECTED] wrote:
I'm with Neil on this one. Don't we usually try to do things
as correct as possible? Just because CF sees 23 as a
boolean
I've taken way too many shots to the head to debate this with
you. I'm sure you're right, but I just don't see it yet.
I don't think it matters that much one way or the other. I simply think we
should be more careful about how we define best practices generally.
Dave Watts, CTO, Fig Leaf
The reason is sometimes we want default values on a create screen.
Easy, then just use
CFIF getItem.recordCount
VALUE=#getItem.itemValue#
CFELSE
VALUE=some default
Back on subject, ah ah! ;-)
--
___
REUSE CODE! Use custom tags;
See
Are you insane? I am just supposed to assume that getitem exists and that
it is a query and that itemvalue is a column name within it? Sorry but that
is just bad coding right there, you are not checking for the proper
existance of things and lets not even get started on the fact you are
treating
On 10/4/06, Aaron Rouse [EMAIL PROTECTED] wrote:
lets not even get started on the fact you are
treating a record count on a query like a boolean.
What's the matter with treating a recordcount like a boolean? It's
either zero (equivalent to false) or non-zero (equivalent to true)
and since
Aaron Rouse wrote:
and lets not even get started on the fact you are
treating a record count on a query like a boolean.
I could be mistaken, but hasn't that been the crux of most of this
debate?
Mark
--
This message has been scanned for viruses and dangerous
content by ISPNZ's automated
Looks like you are confusing CF processing and DBMS processing. You'll want
to do that if test in the DBMS itself, and CFML does not execute in the
DBMS. The exact syntax for an if or case statement can vary by DBMS, so hard
to give you exact syntax, but take a look at SQL if and case statements
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
heh ... I guess you did not read the 62 or so replies with this subject, I
was being sarcastic, sorry.
On 10/3/06, Mike Kear [EMAIL PROTECTED] wrote:
On 10/4/06, Aaron Rouse [EMAIL PROTECTED] wrote:
lets not even get started on the fact you are
treating a record count on a query like a
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
Sorry, figured it was obvious that I was just beating a dead horse and being
sarcastic especially considering the other things I typed in there to also
always check.
On 10/3/06, Mark Henderson [EMAIL PROTECTED] wrote:
Aaron Rouse wrote:
and lets not even get started on the fact you are
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
Actually, my sorry. No i came into this thread late.Looks like i
missed a great argument. Oh woe I'm so sad to have missed an
argument!
Cheers
Mike Kear
Windsor, NSW, Australia
Adobe Certified Advanced ColdFusion Developer
AFP Webworks
http://afpwebworks.com
ColdFusion, PHP, ASP, ASP.NET
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
:33 2006
Subject: RE: CFIF Statement
No, the point here is that cfif query.recordcount will give
you true or false usually reserved for booleans which do
actually give true/false/1/0, such as isStruct()
If a language supports implicit evaluation of integers as Boolean values
Oct 02 05:15:13 2006
Subject: Re: CFIF Statement
If the query failed, wouldn't an error get thrown?
I personally do not see how dynamic evaluation is such a bad thing. I
recall when everyone on these lists started saying how bad it is and when
those CF guidelines were put out on the MACR site
Erm, I never said it was ambiguous (if this is indeed the
message you are replying to). The point is that
query.recordcount is not a boolean - it could have 3 possible
values true, false, nothing..(in ColdFusion terms)
No, it's not a Boolean. But I don't see how it could have nothing as a
To: CF-Talk
Sent: Mon Oct 02 02:11:33 2006
Subject: RE: CFIF Statement
No, the point here is that cfif query.recordcount will give
you true or false usually reserved for booleans which do
actually give true/false/1/0, such as isStruct()
If a language supports implicit evaluation
2006
Subject: RE: CFIF Statement
Erm, I never said it was ambiguous (if this is indeed the
message you are replying to). The point is that
query.recordcount is not a boolean - it could have 3 possible
values true, false, nothing..(in ColdFusion terms)
No, it's not a Boolean. But I don't
) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com
-Original Message-
From: Teddy Payne
To: CF-Talk
Sent: Mon Oct 02 14:11:15 2006
Subject: Re: CFIF Statement
Evaluation
No, I am not claiming anything :-) I do see what you mean
though and indeed I think I used to use this method but last
time I checked if you select from table where value does not
exist It could/would return NULL or EMPTY STRING when using
query.recordcount? Others seem to think this as
Neil
I notice a slight subtle difference in the comparison you are making...
Of course a function like IsStruct() is always going to return you a
boolean value by nature of what it is asking? (However it also isn't
failsafe as the variable you are evaluating isn't necessarily defined
which will
I have never seen a query fail in this manner. I always when running select
queries either get a zero or more record count. Can you provide an example
where a cfquery on a select query would return a blank record count? I just
never have seen this happen before.
The only way I could even see
If you know of the existence of the query, then the recordcount is typically
safe. What if you have other people writing queries and changing the names
of queries without your knowledge? This is not uncommong where you have
multiple developers modifying the same code.
Teddy
On 10/2/06, Aaron
The point is that query.recordcount is not a boolean
May I recall that CF is a typeless language.
There are no such things like boolean as such, nor integers nor reals
actually.
Since CFML is a kind of layer above HTML, everything is more or less stored
and treated as strings first.
Only at
Could what if code to death though. If there is no control over other
developers going in and just changing things and not understanding what is
going on then there are bigger problems to be solved.
However going with that, so if someone goes in and changes the name of a
query but not any code
What if you have other people writing queries and changing the names
of queries without your knowledge?
Then anything can happen.
Other people couls as well modify the structure of the database, even delete
tables and templates, no matter which way you wrote the code in them.
You cannot prove
If you know of the existence of the query, then the
recordcount is typically safe. What if you have other people
writing queries and changing the names of queries without
your knowledge? This is not uncommong where you have
multiple developers modifying the same code.
Then you will have
Claude,
I am just giving an example for the existence of a cfquery object or a
cfstoredproc result. If the schema is changed, then that is beyond the
scope of this thread.
Teddy
On 10/2/06, Claude Schneegans [EMAIL PROTECTED] wrote:
What if you have other people writing queries and changing
On 10/2/06, Dave Watts [EMAIL PROTECTED] wrote:[...]
Then you will have the same problem whether you treat RecordCount as a
Boolean or as a numeric value - you'll get an error. But the point of the
earlier statement was that it's better to treat RecordCount as a numeric
value, and I don't
Sorry so wordy with so little clarity, probably, but I'll use
this example, that I think Neil might have given:
if(someQuery.recordcount GT 0)
vs.
if(someQuery.recordcount)
The second, while being true, isn't as true as the first.
That's ridiculous, by definition. There are no
On 10/2/06, Dave Watts [EMAIL PROTECTED] wrote:
Sorry so wordy with so little clarity, probably, but I'll use
this example, that I think Neil might have given:
if(someQuery.recordcount GT 0)
vs.
if(someQuery.recordcount)
The second, while being true, isn't as true as the first.
Just make sure and check to see that someQuery exists in the variables
structure first and then make sure and check that someQuery within the
variables structure is a query and then check the recordcount to be greater
than zero and all should be good. Also when outputing, make sure the column
And hey, what if there is some warp hole, or what-have you,
and the only bit
of code to survive is that one line? How much info would
those 5 chars
give?
As we all know, there are NO programmers who inappropriately name variables.
Seeing as how the variable is named RecordCount, it's hard
Hey, I wonder if you can help me. I am new here and I am having difficulties in
getting a cfif tag to work on my page. I have a search page, where the user
can select their criteria from a drop down list, then click the submit button.
This then takes them to the next page that searches the
It should be
cfif query.recordCount GT 0
-Original Message-
From: William James Neil Kiddie Baskerville
[mailto:[EMAIL PROTECTED]
Sent: 01 October 2006 11:37
To: CF-Talk
Subject: Re: CFIF Statement
Hey, I wonder if you can help me. I am new here and I am having difficulties
in getting
It should be
-Original Message-
From: William James Neil Kiddie Baskerville
[mailto:[EMAIL PROTECTED]
Sent: 01 October 2006 11:37
To: CF-Talk
Subject: Re: CFIF Statement
Hey, I wonder if you can help me. I am new here and I am having difficulties
in getting a cfif tag to work on my
you dont even need the GT you can just use cfif query.recordCount
--
Nick Tong
web: http://talkwebsolutions.co.uk
blog: http://succor.co.uk
short urls: http://wapurl.co.uk
green link: http://wapurl.co.uk/?4Z2YDLX
://www.reedexpo.com
-Original Message-
From: Nick Tong - TalkWebSolutions.co.uk
To: CF-Talk
Sent: Sun Oct 01 17:20:26 2006
Subject: Re: CFIF Statement
you dont even need the GT you can just use cfif query.recordCount
--
Nick Tong
web: http://talkwebsolutions.co.uk
blog
(RX)
[mailto:[EMAIL PROTECTED]
Sent: Sunday, October 01, 2006 1:00 PM
To: CF-Talk
Subject: Re: CFIF Statement
This though can be frowned upon. It is evaluating it as a booleon when in
most cases it will never be. Some say bad use.
This e-mail is from Reed Exhibitions (Gateway
switchboard on +44 (0) 20 89107910. The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com
-Original Message-
From: Loathe
To: CF-Talk
Sent: Sun Oct 01 18:38:08 2006
Subject: RE: CFIF Statement
is doing, I don't have a problem with shortcut
evaluations at all.
You don't think thats clear?
-Original Message-
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: Sunday, October 01, 2006 1:00 PM
To: CF-Talk
Subject: Re: CFIF Statement
This though can
. Bland II
To: CF-Talk
Sent: Sun Oct 01 19:02:39 2006
Subject: Re: CFIF Statement
The idea is not to bank on myquery.RecordCount being a boolean. What happens
if the query fails? Then myquery won't contain RecordCount. I think this is
what he meant.
Most of the time I'll add checks:
cfif isQuery
No, the point here is that cfif query.recordcount will give
you true or false usually reserved for booleans which do
actually give true/false/1/0, such as isStruct()
If a language supports implicit evaluation of integers as Boolean values,
there is nothing wrong with taking advantage of
agreed. Note that folks in JS land use this all the time.
if( document.someobject )
IIRC, can use in Java toooh and AS.
DK
On 10/1/06, Dave Watts [EMAIL PROTECTED] wrote:
No, the point here is that cfif query.recordcount will give
you true or false usually reserved for booleans which
If the query failed, wouldn't an error get thrown?
I personally do not see how dynamic evaluation is such a bad thing. I
recall when everyone on these lists started saying how bad it is and when
those CF guidelines were put out on the MACR site that supported the idea of
them being bad. At some
CFIF LEFT(LASTNAME,1) EQ A#LASTNAME#/CFIF
[EMAIL PROTECTED] 06/24/02 12:10PM
Trying to do a CFOUTPUT Statement that returns all of the lastname
records
that begin with the letter A, and order by lastnames, but the
following is
not working, any ideas?
cfif LASTNAME IS A#LASTNAME#/cfif
Thanks
Give this a try - (off the top of my head)
Tony Gruen
cfif QueryName.LASTNAME LEFT(form.b_email, 1) CONTAINS 'A'
-Original Message-
From: Kent A. Orso [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 9:11 AM
To: CF-Talk
Subject: CFIF Statement
Trying to do a CFOUTPUT
Your code will only show those lastnames that ARE A, not that begin with A. Try this
CFIF Left(Lastname, 1) IS A
The Left function will take the variable and return a number of characters from it. In
the above example, it will return the first letter. This letter can then be compared
to A.
That will only output lastnames that are A, not lastnames that begin with A.
-Original Message-
From: Kent A. Orso [mailto:[EMAIL PROTECTED]]
Sent: 24 June 2002 17:11
To: CF-Talk
Subject: CFIF Statement
Trying to do a CFOUTPUT Statement that returns all of the lastname records
that
CFIF LEFT(LASTNAME,1) IS A#LASTNAME#/CFIF
HTH,
Jim Vosika
http://www.softwaresupermall.com
-Original Message-
From: Kent A. Orso [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:11 AM
To: CF-Talk
Subject: CFIF Statement
Trying to do a CFOUTPUT Statement that returns all of
Trying to do a CFOUTPUT Statement that returns all of the
lastname records that begin with the letter A, and order
by lastnames, but the following is not working, any ideas?
cfif LASTNAME IS A#LASTNAME#/cfif
Your CFIF says that the WHOLE LastName must be A
Try
CFIF Left(LastName,1) is A
cfif Left(LastName,1) eq A
That said, I'd make the database do the work and run a query that only retrieves
lastnames that
start with A.
my 2 cents
Bryan Stevenson B.Comm.
VP Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
Kent,
What Michael said...but just as follow-up...if you did it with your SQL
statement instead in CF you would probably see a nice performance hit too...
WHERE tablename.lastname LIKE 'A%'
HTH,
John
-Original Message-
From: Kent A. Orso [mailto:[EMAIL PROTECTED]]
Sent: Monday, June
Or somehow work in Query of Querys if it is appropriate for this
task
My 2ยข
Jim Vosika
http://www.softwaresupermall.com
-Original Message-
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:23 AM
To: CF-Talk
Subject: Re: CFIF Statement
cfif Left
cfif Left(LastName,1) eq A#LASTNAME#/CFIF, #FIRSTNAME#
#DEPARTMENT#BR
/CFOUTPUT
- Original Message -
From: Randell B Adkins [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 12:13 PM
Subject: Re: CFIF Statement
CFIF LEFT(LASTNAME,1) EQ A#LASTNAME#/CFIF
[EMAIL
/CFOUTPUT
- Original Message -
From: Randell B Adkins [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 12:13 PM
Subject: Re: CFIF Statement
CFIF LEFT(LASTNAME,1) EQ A#LASTNAME#/CFIF
[EMAIL PROTECTED] 06/24/02 12:10PM
Trying to do a CFOUTPUT Statement that returns
QUERY=list
cfif Left(LastName,1) eq A#LASTNAME#/CFIF, #FIRSTNAME#
#DEPARTMENT#BR
/CFOUTPUT
- Original Message -
From: Randell B Adkins [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Sent: Monday, June 24, 2002 12:13 PM
Subject: Re: CFIF Statement
CFIF LEFT(LASTNAME,1) EQ A#LASTNAME
You could use Query of Query or simply:
CFIF LEFT(LASTNAME,1) NEQ A#LASTNAME#/CFIF
Jim Vosika
http://www.softwaresupermall.com
-Original Message-
From: Kent A. Orso [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 11:42 AM
To: CF-Talk
Subject: Re: CFIF Statement
Thanks
CFOUTPUT QUERY=list
cfif Left(LastName,1) eq A#LASTNAME#/CFIF, #FIRSTNAME#
#DEPARTMENT#BR
/CFOUTPUT
On top of the Query suggestions...
What you're doing here is only not displaying the surname, but quite
happily displaying the FirstName and Department, no matter what the name
is...
Philip
Hi,
I have a problem with the syntax below.
This works:
cfif #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# CONTAINS 'aachen'
...code...
cfelse
...code...
/cfif
This does not:
cfif #LCase(ListGetAt(GetFontFamily.sti,1,'.'))# CONTAINS 'aachen' OR
'adelon'
...code...
1 - 100 of 111 matches
Mail list logo