I'm sure that this isn't the best solution but this will work

Query 1

<cfquery name="query1" datasource="datasource">
SELECT RecordID,  foo
FROM bar
</cfquery>


Query 2

<cfoutput query="query1">
Insert query
<cfquery name="insert" datasource="datasource">
INSERT INTO bar2 (RecordID, foo2)
VALUES(#RecordID#, '#foo#')
</cfquery>

update

<cfquery name="update" datasource="datasource">
UPDATE bar2
SET foo2 =  '#foo#'
WHERE RecordID = #RecordID#
</cfquery>

</cfoutput>

--Kat

====================
Katrina Chapman
Consultant
Ameriquest Mortgage


                                                                                       
                                         
                    "Henry, David                                                      
                                         
                    B"                   To:     "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                      
                    <dbhenry@indi        cc:                                           
                                         
                    ana.edu>             Subject:     Query Question                   
                                         
                                                                                       
                                         
                    07/05/00                                                           
                                         
                    02:00 PM                                                           
                                         
                    Please                                                             
                                         
                    respond to                                                         
                                         
                    fusebox                                                            
                                         
                                                                                       
                                         
                                                                                       
                                         




I am using a database query which gets a value from a URL Parameter and
returns all of the records associated with that Parameter.  So far, so
good.
Next, I want to use the RecordID from the first query in a second query.
The problem is that when I try it, I only get the first recordID to appear
in the Second Query.

Does this make sense?  If so, can anyone help.

Thanks,

David
------------------------------------------------------------------------------

To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.




------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to