Hi there.
I played around with the concept of what you're doing, and it is sound. I built
this simple template to prove it:
cfquery name=getbits datasource=mydatasource
select * from bittest
/cfquery
cfdump var=#getbits#
cfset column_string = bool1=1,bool2=0,bool3=1
cfquery
Hi,
I'm trying to construct a dynamic sql server update statement on a table with a
large number of fields, most of them type bit. First I evaluate all the
yes/no fields and convert them to 1/0. Then I build a string of column
(field) names and values, e.g, {name of field1}=0, {name of
define bombs and do a cfoutput on #column_string# to see exactly
what SQL you're generating.
On 6/28/07, david cowen [EMAIL PROTECTED] wrote:
Hi,
I'm trying to construct a dynamic sql server update statement on a table with
a large number of fields, most of them type bit. First I evaluate
.
..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: david cowen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 28, 2007 6:44 PM
To: CF-Talk
Subject: how can I dynamically build field names string in a sql update
statement?
Hi,
I'm trying
field2=1, set field3=0 portion.
-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 28, 2007 6:20 PM
To: CF-Talk
Subject: RE: how can I dynamically build field names string in a sql update
statement?
Well, without trying the code out or looking real
If I remove the quote marks, then the program fails on line 0 of this
routine; i.e., this code does not execute. With the quote marks, the
routine gets executed but fails and there is a sql statement in the
resulting error message. The sql statement has quote marks around the set
field1=0, set
Message-
From: David S. Cowen [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 28, 2007 9:03 PM
To: CF-Talk
Subject: RE: how can I dynamically build field names string in a sql update
statement?
If I remove the quote marks, then the program fails on line 0 of this
routine; i.e., this code does
7 matches
Mail list logo