I do not and never have. Not against it, but just never saw the need.
From: "Dain Anderson"
Sent: Tuesday, March 15, 2011 10:27 AM
To: "cf-talk"
Subject: Do people still name their UPDATE, INSERT & DELETE queries?
I may hav
> I may have missed conversation of this over the years, so I figured I would
> ask.
>
> What's the current "take" on this (old?) practice? If I have a CFC function
> that deletes a record, and that CFC contains a single query, do you find it
> necessary to scope that query with a name?
It's neit
> I would even go so far as to recommend you delete it. Less code means less
> bugs.
The converse of this is, fewer changes to existing code means fewer
bugs. There's no reason to waste time making trivial changes to
existing code.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http
On 3/15/2011 9:34 PM, Raymond Camden wrote:
> I don't bother. Is it worthwhile to go through code and change it -
> not imho. (Unless of course you forgot to varscope it.)
but builder complains though. and we must do what builder says, right ;-)
~~
Agreed, we do this as well. I'm more or less concerned with a more "in
general," as a concept.
It sounds like it's unnecessary and safe to remove. Thanks for everyone's
help.
-Dain
On Tue, Mar 15, 2011 at 10:40 AM, Phillip Duba wrote:
>
> I do purely for debugging purposes. This way I can du
I do purely for debugging purposes. This way I can dump the resultset, with
the new features in 8 and 9, and see exactly what is going on with the query
in the form of parameters, generated SQL, etc.,
Phil
On Tue, Mar 15, 2011 at 10:26 AM, Dain Anderson wrote:
>
> I may have missed conversation
On Tue, Mar 15, 2011 at 10:26 AM, Dain Anderson wrote:
>
> I may have missed conversation of this over the years, so I figured I would
> ask.
>
> What's the current "take" on this (old?) practice? If I have a CFC function
> that deletes a record, and that CFC contains a single query, do you find
If you aren't using any kind of returned data from a query, don't worry
about giving the cfquery tag a name attribute. It's a few extra bytes you
can save on your fingers. I would even go so far as to recommend you delete
it. Less code means less bugs.
nathan strutz
[http://www.dopefly.com/] [htt
I don't bother. Is it worthwhile to go through code and change it -
not imho. (Unless of course you forgot to varscope it.)
On Tue, Mar 15, 2011 at 9:26 AM, Dain Anderson wrote:
>
> I may have missed conversation of this over the years, so I figured I would
> ask.
>
> What's the current "take"
I may have missed conversation of this over the years, so I figured I would
ask.
What's the current "take" on this (old?) practice? If I have a CFC function
that deletes a record, and that CFC contains a single query, do you find it
necessary to scope that query with a name?
d
Interesting, I tried it just now and it let me make it. It probably failed for
me on an older version and I never bothered to try again and just assumed that
is how it will be.
Thanks I will play with your example and see if I can make it work in my real
world example with multiple fields for
Interesting,I tried it just now and it let me make it. It probably failed
for me on an older version and I never bothered to try again and just
assumed that is how it will be.
For number of rows effected you should be able to get that from the
sql%rowcount This is off the top of my head so will
I do not think you can pass the needed PL/SQL to Oracle through a CFQUERY to
create the SP. If that were possible then you should be able to write queries
just in a CFQUERY that give you what you need/want.
Actually you can, at least in a limited way. It is a multi-step process.
Somewhere ru
I do not think you can pass the needed PL/SQL to Oracle through a CFQUERY to
create the SP. If that were possible then you should be able to write
queries just in a CFQUERY that give you what you need/want.
On 2/9/06, Ian Skinner <[EMAIL PROTECTED]> wrote:
>
> Well number of rows affected would b
On 2/8/06, Aaron Rouse <[EMAIL PROTECTED]> wrote:
>
> I have never seen a way you could do this and it work in a cfquery.
> Could do it through an SP, what information is it that you want
> returned?
Well number of rows affected would be a start. If it is not too difficult, Key
value(s) of th
I had a similar requirement couple of months back and my solution was to
create a JDBC call manually. I hope that Adobe will add this feature to next
version of CF.
Thanks
On 2/8/06, Aaron Rouse <[EMAIL PROTECTED]> wrote:
>
> I have never seen a way you could do this and it work in a cfquery. C
I have never seen a way you could do this and it work in a cfquery. Could
do it through an SP, what information is it that you want returned?
On 2/8/06, Ian Skinner <[EMAIL PROTECTED]> wrote:
>
> Is this possible and easy to do? Get rows updated information from insert
> and update SQL statement
Is this possible and easy to do? Get rows updated information from insert and
update SQL statements?
PS. For Michael: I originally sent this query by e-mail on Monday. It never
showed up. For awhile now, any orginial message I send just disappears. I can
reply, but new messages are a no go
> Sent: 22 April 2001 16:59
> To: CF-Talk
> Subject: Re: UPDATE / INSERT
>
>
> Will CFCATCH/CFTRY with DATABASE error be a better solution?
> i.e - TRY TO UPDATE no matter what -> if error occurs (row not exists) ->
> INSERT.
> Is this better then SELECT?
>
>
<[EMAIL PROTECTED]>
Sent: Sunday, April 22, 2001 4:29 PM
Subject: RE: UPDATE / INSERT
> OK, u.recordcount could be 0 if the record you are expecting to find does
> not exist or if the value of DT in that record does not match your
criteria.
> Your code will create a new record if eit
Phil.
> -Original Message-
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 15:51
> To: CF-Talk
> Subject: Re: UPDATE / INSERT
>
>
> something like this.
>
> Thanks!
>
>
> SELECT DN from logs WHERE DT=#DT#
>
>
CTED]>
Sent: Sunday, April 22, 2001 3:20 PM
Subject: RE: UPDATE / INSERT
> Please post your current SELECT/UPDATE code so I can see exactly what you
> are doing.
>
>
> Phil.
>
> > -Original Message-
> > From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> &g
Please post your current SELECT/UPDATE code so I can see exactly what you
are doing.
Phil.
> -Original Message-
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 15:30
> To: CF-Talk
> Subject: Re: UPDATE / INSERT
>
>
> It'll only wo
previously assigned a value. Does this make sense?
Phil.
> -Original Message-
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 13:59
> To: CF-Talk
> Subject: Re: UPDATE / INSERT
>
>
> but if the value is not exists in "COLUM" I
It'll only work if I have all the possible values already placed in COLUM1.
- Original Message -
From: "Phil Ewington" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, April 22, 2001 2:34 PM
Subject: RE: UPDATE / INSERT
> Y
OTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, April 22, 2001 1:18 PM
Subject: RE: UPDATE / INSERT
> Micheal,
>
> Thinking about it, if the value does exist and you simply want to check
what
> that value is before updating, you could always do an update
elect & update) if the
update is required. Only a thought.
Phil.
> -Original Message-
> From: Phil Ewington [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 12:04
> To: CF-Talk
> Subject: RE: UPDATE / INSERT
>
>
> Do you mean if the record exists UPDATE,
you will always be able to
increment the value by 1 using UPDATE.
HTH
Phil.
> -Original Message-
> From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
> Sent: 22 April 2001 13:06
> To: CF-Talk
> Subject: UPDATE / INSERT
>
>
> I'm trying to find the best way to
I'm trying to find the best way to have SQL do this:
IF COLUM1 already contains "VALUE" then UPDATE COLUM2+1
IF NOT, INSERT COLUM1,COLUM2 VALUES ("VALUE",1)
Currently I'm using SELECT / RecordCount to first find out if the VALUE exists.
There must be a better way...
Michael.
~
29 matches
Mail list logo