Code: Select all
      put "UPDATE"  &&TABLENAME && "SET dbfld = '1' WHERE dbfldA = 'fldA' AND dbfldB = 'fldB'" into tSQL
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
      put "UPDATE"  &&TABLENAME && "SET dbfld = '1' WHERE dbfldA = 'fldA' AND dbfldB = 'fldB'" into tSQL
-first rule : use meaningful name (dbflda... prone to errors), it's easier to read, to debug, and to remembershawnblc wrote:Needs some assistance on this SQL query. On my card I have fldA and fldB. In my database I have dbfld, dbfldA and dbfldB.
Code: Select all
put "UPDATE" &&TABLENAME && "SET dbfld = '1' WHERE dbfldA = 'fldA' AND dbfldB = 'fldB'" into tSQL
Code: Select all
answer tSQLCode: Select all
 put "UPDATE"  &&TABLENAME && "SET dbfld = '1' WHERE dbfldA = '" & fld "fldA" & "' AND dbfldB = '" &fld "fldB" & "'" into tSQL
answer tSQL
Code: Select all
   if the result is a number then
      answer info "Record Updated."
Code: Select all
if tSQL contains "revdberr" then
answer warning "error"
 bangkok thanks again for the response above.  it helps a great deal.  Lots of nice and knowledgeable guys/gals on this board.  Makes me glad I was part of the KS campaign.
  bangkok thanks again for the response above.  it helps a great deal.  Lots of nice and knowledgeable guys/gals on this board.  Makes me glad I was part of the KS campaign.