May 3, 200520 yr Hi All, I need to make sure my source table has a matching memberID before i try to update it in a ExecuteSQL step. Any ideas on which is the best way to go... 1) Perform an import/count: SELECT COUNT (*) FROM myTable WHERE memberID = 1234 with that answer placed in a temp_table decide to update or not based on result (1 or greater has found a match; 0 means not match was found). I would have to perform this for EVERY record i want to update (put in a loop) 2) Perform an import of all the memberIDs in myTable then compare them in FileMaker with the memberID i want to update (not sure how yet!! maybe use a relationship or a find script step and test if FoundCount = 0. Find would be slower then relationship right??) thanks for your input/comments! Dan
May 3, 200520 yr What about just attempting the update, and if it fails (error returned) then branch your script to do something else (like create a new record in the data source that has the appropriate ID, or display a custom error dialog which gives you options) Dana
May 3, 200520 yr Author That was my original idea... See my other posts in this section... When i tried the UPDATE.... in the ExecuteSQL script step no error is generated when there is no match!! Or if there is an error (something like SQL_NO_DATA) it is not passed back to FM via Get(LastODBCerror). The only result i get with Get(LastODBSerror) is 00000.
Create an account or sign in to comment