> Just a quick question - why would one write an Action page with the
> following bit of code for a insert select statement
>
> METHOD A:
>
> Insert into TblCustomer (CustomerId, Forename,Surname, CompanyName)
> SELECT tmpTblCustomer.CustomerId, tmpTblCustomer.Forename,
> tmpTblCustomer.Surname, tmpTblCustomer.CompanyName
> FROM tmpTblCustomer
> WHERE tmpTblCustomer.CustomerId = #Variables.intNextPersonID#
>
> As opposed to the following:
>
> METHOD B:
>
> INSERT INTO TblCustomer
> SELECT tmpTblCustomer.*
> FROM tmpTblCustomer
> WHERE tmpTblCustomer.CustomerId = #Variables.intNextPersonID#
>
> A) Is there a performance drain using METHOD B in any db as
> opossed to using METHOD B ( using access )
> B) Does anyone use METHOD A as opposed to METHOD B and Why ???
OK, for one SELECT * is -=ALWAYS=- slower than naming rows, so "Method B"
will have an inherant delay in it before you get anywhere
If you use SELECT * anywhere, you should change it to the names of the
fields
I tend to use INSERT INTO () SELECT FROM as you can specify which fields map
to which fields, and specify values instead of fields
Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133
"Websites for the real world"
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists