Hi, If I want to query a table for an id and then save that id to another table, can I do it in the same SQL statement? If so, how do I refer to the value from the first select? It's something like this:
<cfquery datasource="#datasource#"> <cfloop from="1" to="whatever" index="index"> select id from table_1 insert into table_2(table_1_id)values(the_id_ just queried) </cfloop> </cfquery> TIA, Doug Jordon ______________________________________________________________________ Get Your Own Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation · $99/Month · Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists