David Collie (itndac) wrote: > > <cfquery name="qIF_GetQuestion" datasource="#APPLICATION.sIF_DSN#"> > SELECT <cfqueryparam value="#sColName#" cfsqltype="CF_SQL_VARCHAR"> AS >QUESTION > FROM <cfqueryparam value="#sTableName#" cfsqltype="CF_SQL_VARCHAR"> > WHERE <cfqueryparam value="#sPKCol#" cfsqltype="CF_SQL_VARCHAR"> = ><cfqueryparam value="#iIF_ElementID#" cfsqltype="CF_SQL_DECIMAL"> > </cfquery> > > > Not actually looked at if there has been any major performance increase cause of >this but can anybody explain why it doesn't accpet it in the FROM clause, but it does >in the SELECT or WHERE?
Typecasting. A table does not have the type VARCHAR. You might get lucky with some other type (IDENTIFIER? NAME? TABLE?), but I don't think this behaviour is fully standardized. Jochem ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

