October 6, 200619 yr Newbies 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.
November 19, 200619 yr 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.
Create an account or sign in to comment