Chad,
Try something like this:
<cfquery name="selectarow"...>
select top 1 * from table
</cfquery>
<cfif selectarow.recordcount is not 0>
<cfquery ...>
update table
set
<cfloop collection="#selectarow.columns#" item="key">
<cfif key is not 'ID'>#key# = '',</cfif>
ID = ID
</cfloop>
</cfquery>
Code from brain directly to email so no warranty, liability, or guaranty
on that code...but it might work.
Let me know if it does and I'll treat myself to a cookie :)
[Image:Our Hero] David Henry
http://ColdFusionPowered.com/
Chad Gray wrote:
> Is there anyway to clear the data in a row in a database without using
>
> UPDATE table
> SET foo = '',
> Moo = '',
> Goo = ''
> WHERE ID = 1
>
> I don't want to clear the ID just the other fields.
>
> My table has 50 fields and I don't feel like typing out all of them and
> setting them to blank.
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295837
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4