You don't want to use a where clause in an insert statement, if you are
updating data, you want to use a update statement.
-Jeff
Lisa Greenberg wrote:
>
> I am trying to insert data into a table and get the
> following errors. I provided the semicolon, yet I still get
> the errors. What am I doing wrong?
>
> TIA,
>
> Lisa
>
> ODBC Error Code 37000 (Syntax error or access violation)
> [ODBC Mircosoft Access Driver] Missing semicolon (;) at end
> of SQL statement.
>
> <cfquery name="ptobs" datasource="#dsn#" dbtype="odbc">
> insert into ptobs
> (pi,patno,PSL_ID,currPI,PIreason,pires_ot,dttype,results,
> modHAART, intHAART, intreason, fatmaldis, hypergly, gly_pre,
>
> hyperlip, lip_pre, lla_yn, ll_agent, lla_dose,
> anti_dyn,anti_d, antid_ot, antid_ds)
> values ( '#ptdat.pi#','#variables.patno#',
> #session.PSL_ID#, '#currPI#',
> '#attributes.PIreason#',
> '#attributes.pires_ot#',
> #CreateODBCDateTime(variables.dttype)#,
> '#attributes.results#',
> '#attributes.modHAART#',
> '#attributes.intHAART#',
> '#attributes.intreason#',
> '#attributes.fatmaldis#',
> '#attributes.hypergly#',
> '#attributes.gly_pre#',
> '#attributes.hyperlip#',
> '#attributes.lip_pre#',
> '#attributes.lla_yn#',
> '#attributes.ll_agent#',
> '#attributes.lla_dose#',
> '#attributes.anti_dyn#',
> '#attributes.anti_d#',
> '#attributes.antid_ot#',
> '#attributes.antid_ds#' )
> where demog.PSL_ID=#session.PSL_ID#
> ;
> </cfquery>
>
> ------------------------------------------------------------------------------
> 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.
------------------------------------------------------------------------------
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.