> I both agree and disagree with Philip regarding building dynamic SQL.  I
> cannot think of many cases where you _cannot_ do it in an SP, but
> if you are
> actually building your SQL statement from within the SP, then you lose one
> of the performance benefits of SPs (it cannot be pre-compiled).

Certain things are impractacle (sp?) in a SP, for example, if you want to
alter a table structure and have the field name/types dynamic, then this
wouldn't work at all properly in a SP;
alter table #myTableAlterations#
If this had all sorts of field type/length changes (e.g. VARCHAR to TEXT)
then you just wouldn't want to do this in a SP

I do this a lot as my table structures can be altered in the back offices -
I have a list of fields and types and the system adds/updates the fields to
the tables - means I can adjust loads of tables automatically just by
changing one tiny bit of code

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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

Reply via email to