Lisa,

A semicolon is not needed in a CF SQL statement
and also you really have an SQL UPDATE cmd since
you have a WHERE clause.  So, you either need to
change the INSERT to UPDATE or remove the WHERE 
clause.   Also, remove the ;

Jim

-----Original Message-----
From: Lisa Greenberg [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 03, 2000 2:05 PM
To: cftalk
Subject: What am I doing wrong?



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.

Reply via email to