Advice needed/suggestions on how to insert multiple records

I need some advice or suggestions on the best way to accomplish this.

I have a table with records imported into our system, and it’s like a temporary table. I have a search field and the user types in the identifier of the records he wants to return. Simple so far. Then I want to insert those found records into another table. No updating or anything, basically a copy from one table to another. I’ve looked at the multi insert, insert with a repeater but not really sure what the best approach is.

If anyone can give some insight I would appreciate it.

create a new server action script:

create a query table one
repeat region the query one
insert data into table two

dont forget to add the fields that you want to be able to add to table two in the repeat step.

1 Like

That’s a great idea, and one I have not thought of. Thanks for the help!

If you are comfortable writing a custom query, INSERT INTO (SELECT…) will perform much better if count of records to be copied over are high!

1 Like

Thanks. I did think of that, as that is what I’ve done in the past in ASP.NET and classic ASP. I figured the performance would be better overall with multiple records but I should be only dealing with 10-20 records at a time and was trying to use as much native Wappler as possible.
Thanks for the suggestion.

1 Like