re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Jason Fisher
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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Dave Watts
> 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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Dave Watts
> 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

Re: Do people still name their UPDATE, INSERT & DELETE queries? [spamtrap heur]

2011-03-15 Thread Paul Hastings
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 ;-) ~~

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Dain Anderson
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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Phillip Duba
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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Casey Dougall
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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Nathan Strutz
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

Re: Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Raymond Camden
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"

Do people still name their UPDATE, INSERT & DELETE queries?

2011-03-15 Thread Dain Anderson
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

RE: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Ian Skinner
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

Re: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Aaron Rouse
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

RE: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Ian Skinner
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

Re: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Aaron Rouse
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

RE: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Ian Skinner
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

Re: Returning information from Oracle update/insert statements to CF

2006-02-09 Thread Qasim Rasheed
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

Re: Returning information from Oracle update/insert statements to CF

2006-02-08 Thread Aaron Rouse
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

Returning information from Oracle update/insert statements to CF

2006-02-08 Thread Ian Skinner
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

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
> 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? > >

Re: UPDATE / INSERT

2001-04-22 Thread Michael Lugassy
<[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

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
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# > >

Re: UPDATE / INSERT

2001-04-22 Thread Michael Lugassy
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

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
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

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
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

Re: UPDATE / INSERT

2001-04-22 Thread Michael Lugassy
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

Re: UPDATE / INSERT

2001-04-22 Thread Michael Lugassy
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

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
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,

RE: UPDATE / INSERT

2001-04-22 Thread Phil Ewington
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

UPDATE / INSERT

2001-04-22 Thread Michael Lugassy
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. ~