> Will CF escape single quotes in the following two queries?
>
> <cfquery name="InsertInitial" DATASOURCE="#DSN#" USERNAME="#user#"
> PASSWORD="#pass#">
> BULK INSERT jobsINITIAL
> FROM '#File.ServerDirectory#\#FILE.ServerFile#'
> WITH
> (
> FIELDTERMINATOR='|',
> ROWTERMINATOR='
> '
> )
> </cfquery>

Not if you're talking about single quotes coming from the file. However, the
database might do that when you do a BULK INSERT.

> <cfquery name="InsertFinal" DATASOURCE="#DSN#" USERNAME="#user#"
> PASSWORD="#pass#">
> INSERT INTO jobs
> (job_ord,job_dt,job_title,pskill_code,job_sskills,job_sal,job_
> edu,job_deg,job_exp,job_loc,job_loc_id,ind_title,job_other)
> SELECT
> job_ord,job_dt,job_title,pskill_code,job_sskills,job_sal,job_e
> du,job_deg,job_exp,job_loc,job_loc_id,ind_title,job_other
> FROM jobsINITIAL
> </cfquery>

There are no variables here to escape! (Unless you're referring to the
CFQUERY tag parameters.) When you execute an INSERT INTO ... SELECT, the
database will handle all the type-checking for you, so this won't be an
issue.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444

------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to