LLBLGen Pro: How to implement INSERT INTO... SELECT statement

973 views Asked by At

I want to batch insert records with LLBLGen, following is T-SQL:

INSERT INTO Role(idt1) SELECT idt2 FROM template WHERE templateid = 1

How can I do this?

1

There are 1 answers

0
Nick DeVore On BEST ANSWER

You've got two options:

  1. Write a stored procedure
  2. Create the entities (LLBLGen Entities) one at a time and insert them. There is no equivalent to what you want to do en masse in LLBLGen. You can Update or Delete multiple records, but not insert.

You're best bet is probably the stored procedure, which you can obviously call from within LLBLGen Pro.