At 08:21 PM 2/15/05, Barney Boisvert wrote:

>Yes, you can only add data to a single table in a given INSERT query.
>UPDATE is a little different.


Thanks for the confirmation. So, what would good code for a process like 
that look like? Would all 4 inserts be within 1 pair of CFQUERY tags, or 
would each insert have to have its own set of CFQUERY tags? Would a loop be 
an option (though I'm not sure what syntax I'd use for that)?

Thanks,


Roberto Perez
[EMAIL PROTECTED]


>On Mon, 14 Feb 2005 21:37:21 -0500, Roberto Perez <[EMAIL PROTECTED]> 
>wrote:
> > Hi all,
> >
> > Thanks everyone for the tips on querying related tables with inner joins.
> > On that note, I'd like to check the following: when I use INSERT or UPDATE
> > statements in that scenario (related tables), I'd need to do it
> > individually for each table in the relation, right?
> >
> > So, using a previous example, if I have these 4 tables:
> >
> > Table 1: "Word"
> > Field: word PK (many-to-many) (one-to-many)
> > Field: pronunciation FK (one-to-many)
> > Field: URLName FK (one-to-many)
> > Field: meaning
> >
> > Table 2: "Type"
> > Field: word FK
> > Field: type PK  (many-to-many)
> >
> > Table: "WordTypeLinking"
> > Field: word FK
> > Field: type FK
> >
> > Table 3: "Pronunciation"
> > Field: word FK (one-to-many)
> > Field: pronunciation PK (one-to-many)
> >
> > Table 4: "URL"
> > Field: word FK (one-to-many)
> > Field: URLName PK (one-to-many)
> > Field: URLLink
> > Field: URLDescription
> >
> > ....am I correct in assuming I'll have to use 4 different INSERT queries (I
> > understand you can specify only 1 table per query when using INSERT)? Or,
> > what would be a better way to enter that data? Any best practices/tricks
> > you could suggest?
> >
> > Thanks in advance for any suggestions/ideas/sample scripts you can 
> provide :-)
> >


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:194899
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to