Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7142 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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.

This topic is 7142 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.