Hmmm, a fancy SQL solution, eh? I've never tried that but it looks promising.
Keith Purtell, Web/Network Administrator VantageMed Operations (Kansas City) Email: [EMAIL PROTECTED] CONFIDENTIALITY NOTICE: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Adaryl Wakefield Sent: Wednesday, April 10, 2002 12:34 PM To: [EMAIL PROTECTED] Subject: Re: [KCFusion] Query of query not working or how bout INSERT INTO DetailTable (Id, SeqId, Qty, InvId) SELECT Id, SeqId, Qty, InvId FROM WorkingTable WHERE Id = '#form.Id# > ----- Original Message ----- From: "Keith Purtell" <[EMAIL PROTECTED]> To: "KCFusion (E-mail)" <[EMAIL PROTECTED]> Sent: Wednesday, April 10, 2002 12:20 PM Subject: [KCFusion] Query of query not working > Since we run CF5, I occasionally use the query-a-query feature. However the > following code is not working. The first query runs just fine, but the query > that follows either never runs or generates an error message "Insert not > supported". As long as valid data is in the structure (query object) > returned by the first query, shouldn't I be able to loop through that and > insert the data into another table? > > > <CFQUERY NAME="GetRecs" DATASOURCE="Database1"> > SELECT Id, SeqId, Qty, InvId > FROM WorkingTable > WHERE Id = '#form.Id#' > </CFQUERY> > > <CFLOOP FROM="1" TO="#GetRecs.RecordCount#" INDEX="i"> > <CFQUERY DBTYPE="query" NAME="AddRecords"> > INSERT INTO DetailTable > (Id, SeqId, Qty, InvId) > VALUES > ('#GetRecs.Id[i]#','#GetRecs.SeqId[i]#','#GetRecs.Qty[i]#','#GetRecs.InvId[i > ]#') > </CFQUERY> > </CFLOOP> > > > Keith Purtell, Web/Network Administrator > VantageMed Operations (Kansas City) > Email: [EMAIL PROTECTED] > > CONFIDENTIALITY NOTICE: This email message, including any attachments, is > for the sole use of the intended recipient(s) and may contain confidential > and privileged information. Any unauthorized review, use, disclosure or > distribution is prohibited. If you are not the intended recipient, please > contact the sender by reply email and destroy all copies of the original > message. > > > > ______________________________________________________________________ > The KCFusion.org list and website is hosted by Humankind Systems, Inc. > List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org > Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] > To Subscribe.................... mailto:[EMAIL PROTECTED] > To Unsubscribe................ mailto:[EMAIL PROTECTED] > ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED] ______________________________________________________________________ The KCFusion.org list and website is hosted by Humankind Systems, Inc. List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED] To Subscribe.................... mailto:[EMAIL PROTECTED] To Unsubscribe................ mailto:[EMAIL PROTECTED]