It depends on your database.
If you use an industrial strength DB like Oracle or SQL Server 2000 you
should be able to loop through the values in the database. I have this code
in several stored procedures in SQL server 2000
IF LEN(RTRIM(LTRIM(@P_Values))) > 0
BEGIN
WHILE PATINDEX('%,%',@P_Values) > 0
BEGIN
SET @StrPos = PATINDEX('%,%',@P_Values)
SET @Var_Value = CONVERT(INT,LEFT(@P_Values,(@StrPos - 1)))
SET @P_Value = RIGHT(@P_Values,(LEN(@P_Values) -
LEN(LEFT(@P_Values,@StrPos ))))
INSERT INTO ...
END
SET @VAR_Value = @P_Values
INSERT INTO ...
END
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Kevin Faulkner
Sent: Wednesday, 3 March 2004 8:47 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: U P D A T E Multiple Records
If I understand you correctly, you'll need to loop through each selecteded
SELECT bocx option and run a querty for each one, but what else is on the
form, as all fileds will be updated with the same value for each date. If
that's what you want, then use...
<CFLOOP list="#select_box_name#" index="loop">
<CFQUERY etc etc etc >
update myTable
set column1 = #form.column1#
.... etc etc
where column_key = #loop#
</CFQUERY>
</CFLOOP>
----- Original Message -----
From: "Chris Ellem" <[EMAIL PROTECTED]>
To: "CFAussie Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, March 03, 2004 9:37 AM
Subject: [cfaussie] U P D A T E Multiple Records
> General
> Does anyone know how to update multiple records from a form?
>
> Specific
> Does any know how to update multiple records where there is a select
> box in the form?
>
> Currently the value entered into the database in the required field
> displays every entry in the select box with commas between, for every
> record that is to be updated..
>
> Pulling Hair OUT!!!
>
> Any Takers
>
> If you have the answer you can email or call me
>
> [EMAIL PROTECTED]
>
> 1300 302 349
>
> Chris E
>
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to
[EMAIL PROTECTED]
>
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
>
>
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004