Ok, thanks for your help.
My curiosity is satisfied.
Cheers,
Darren
-----Original Message-----
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 13:49
To: CF-Talk
Subject: RE: Insert query inserting a record into multiple tables
There is another way..........
You could insert the data into one of the tables and then have an insert
trigger on that table which automatically inserts the same data into the
second table. However you can only do this if every time you insert into
table 1 you want the same data to go into table 2 (which I'm not sure you'd
ever want to do). Even though you are only wrting 1 sql statement yourself
it is still 2 SQL staements that are executing.
------------------------------------------------------------------
Andrew Ewings
Project Manager
Thoughtbubble Ltd
http://www.thoughtbubble.net
------------------------------------------------------------------
United Kingdom
http://www.thoughtbubble.co.uk/
Tel: +44 (0) 20 7387 8890
------------------------------------------------------------------
New Zealand
http://www.thoughtbubble.co.nz/
Tel: +64 (0) 9 488 9131
------------------------------------------------------------------
The information in this email and in any attachments is confidential and
intended solely for the attention and use of the named addressee(s). Any
views or opinions presented are solely those of the author and do not
necessarily represent those of Thoughtbubble. This information may be
subject to legal, professional or other privilege and further distribution
of it is strictly prohibited without our authority. If you are not the
intended recipient, you are not authorised to disclose, copy, distribute, or
retain this message. Please notify us on +44 (0)207 387 8890.
-----Original Message-----
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 13:41
To: CF-Talk
Subject: RE: Insert query inserting a record into multiple tables
So there is no way to do it in one query then ?
I have done it in two already but, it's just one of those burning questions
I had to ask *L*
Thanks,
-----Original Message-----
From: Adkins, Randy [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 13:19
To: CF-Talk
Subject: RE: Insert query inserting a record into multiple tables
Sure
<cfquery name=First datasource="MyDatabase">
insert into tableone(fieldone,fieldtwo)
Values('#form.field1#','#form.field2'#)
</cfquery>
<cfquery name=Second datasource="MyDatabase">
insert into tabletwo(fieldone,fieldtwo)
Values('#form.field1#','#form.field2'#)
</cfquery>
-----Original Message-----
From: Darren Adams [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 10, 2001 7:21 AM
To: CF-Talk
Subject: Insert query inserting a record into multiple tables
Is this possible ?
The same datasource, the same form field different tables.
Cheers
Darren Adams
Web Developer
Marketing Department
Systems Union
Office: 01252 55 6220
Mobile: 07714 817 038
Email: [EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists