Ask a Question related to Macromedia ColdFusion, Design and Development.
-
ghanna #1
cfloop and update
I have a table with fields id, receiverid, cuid (customer unique id) and type.
id is the primary key. Each receiverid is assigned to a single cuid BUT cuid
can have one or more receiverid. I need to loop over the entire table and
assign type of Primary to each record that has a 1 to 1 relationship. If the
cuid has a multiple of receiverid's one type needs to be assigned primary and
the remaining needs to be assigned secondary.
Confused yet? (I am)
So for example:
Customer A has one receiver (one record in the table) so the type would be
primary.
Customer B has three receivers (three records in the table) so 1 record would
have type assigned to Primary and record two and three would have the type
assigned to secondary.
Now for the million dollar question? Can it be done with cfloop and updating
each record or do we have to do it manually?
Thanks in advance for you help!
Gary
ghanna Guest
-
Access update, CFLOOP, number increment
I have a table with four columns. field0 | field1 | field3 | field10 (primary key) L ABC 101 ... -
cfloop
The goal is to insert a record into table 'atd', which contains a document id and an associate id, for each document (38) and associate (150). So... -
Cfloop..
I am trying to loop over a list: <cfquery name="updsyllabus" datasource="#arguments.syl.dsn#"> UPDATE #arguments.syl.tname# SET <cfloop... -
Cfloop and list
thru a form i recieve several list form.list1 ( 123,$15,000,$15,000,$15,000,x) form.list2 (456,$4,000,$15,000,$15,000,s form.list3... -
to cfloop or not to cfloop?
:confused; I have a list of checkboxes from a form, and a submit button for "Batch Print" The var is "SelectList" and comes out as comma dilimited.... -
mxstu #2
Re: cfloop and update
Is this a one time update? If so, instead of looping through each record, it
would be more efficient to create a small sql script to do this, using a temp
table perhaps and one or two update statements. It shouldn't be that complex.
mxstu Guest
-
ghanna #3
Re: cfloop and update
Thanks... We did it manually with a simple update record page. I don't know enough about SQL to write scripts.
ghanna Guest
-



Reply With Quote

