Re: Is this SQL trick possible
yes. update tableA set fieldA = 1 since YOU are updateing the table you already know what the value will be. Of course, you could clarify your question. On Thu, 15 Nov 2001, Robert Everland wrote: > Is there anyway I can get the value of a field that I update without > having to do a query first. > > Robert Everland III > Dixon Ticonderoga > ~~ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is this SQL trick possible
you can update and then create a trigger to select the record that was updated. Shlomy -Original Message- From: Craig Dudley [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 11:07 AM To: CF-Talk Subject: RE: Is this SQL trick possible erm, can't you do the update and a select in the same cfquery block? If your'e using SQLserver u can anyway, as long as the cfquery only returns one recordset, e.g. - begin transaction update tblTable set value1=1 where id=1; select value1 from tblTable where id=1; commit transaction #test.value1# - That's crappy example and a bit pointless, but you should understand what I'm getting at. -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: 15 November 2001 15:58 To: CF-Talk Subject: Is this SQL trick possible Is there anyway I can get the value of a field that I update without having to do a query first. Robert Everland III Dixon Ticonderoga ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is this SQL trick possible
Couldn't you grab the value of the field with the onBlur event using JS? I think that is very plausible. -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 9:58 AM To: CF-Talk Subject: Is this SQL trick possible Is there anyway I can get the value of a field that I update without having to do a query first. Robert Everland III Dixon Ticonderoga ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: Is this SQL trick possible
erm, can't you do the update and a select in the same cfquery block? If your'e using SQLserver u can anyway, as long as the cfquery only returns one recordset, e.g. - begin transaction update tblTable set value1=1 where id=1; select value1 from tblTable where id=1; commit transaction #test.value1# - That's crappy example and a bit pointless, but you should understand what I'm getting at. -Original Message- From: Robert Everland [mailto:[EMAIL PROTECTED]] Sent: 15 November 2001 15:58 To: CF-Talk Subject: Is this SQL trick possible Is there anyway I can get the value of a field that I update without having to do a query first. Robert Everland III Dixon Ticonderoga ~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists