SQL - Insert

Results 1 to 2 of 2

Thread: SQL - Insert

  1. #1
    Join Date
    Dec 1969

    Default SQL - Insert

    Can someone please tell me the SQL to add values to a table depending on the value of another field. So for example (in english), insert value1 into table2 if table1.whatever = "true"<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL - Insert

    Assumptions: You already have a recordset object with the field values that you want to base the insert on (If you don&#039t know how to do this, please post).<BR><BR>&#060;% <BR>if RecordObject("fieldname") then<BR> SQLStr="INSERT INTO tablename (..,..) VALUES (" & youraspvarvalue & "," & youraspvarvalue2 & ");"<BR> ConnectionObject.Execute SQLStr<BR>end if<BR>%&#062;<BR><BR>btw, I answered this in your earlier post<BR>Cheers<BR> <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts