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

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

Recommended Posts

  • Newbies
Posted

i'm new to using the 'execute sql' script step and i'm not very well known with sql statements. what i'm trying to to is insert all data in a found set into a mysql database:

INSERT INTO MysqlTable( CustID) Values (" & "'"& FMPTable::CustomerID & "'")

with this code only the first record is inserted, even though i have 10 records in the found set.

doest this mean i need to loop this script step for every record in the found set? or can this be done by modifiying the sql query.

  • 1 month later...
Posted

I can help you with the loop which will keep going until all the records in your found set are processed:

Go to Record/Request/Page [First]

Loop

Execute SQL [No dialog; DSN: wvaadb;

Calculated SQL Text: "UPDATE alumnus SET LastName='" & myFMPDatabase::LastName & "', FirstName = '" & myFMPDatabase::FirstName & "', Address1 = '" & myFMPDatabase::Address1 & "' "

& " WHERE AlumnusID = " & myFMPDatabase::AlumnusID]

Go to Record/Request/Page [Next; Exit after last]

End Loop

However, I have not had success with getting the correct MySQL syntax- can you help me with that? The above would work with a SQL database (Thanks to Jonathan Monroe from Actual Technologies), but does not seem to with MySQL.

This topic is 6581 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.