Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Insert into table using ReadallQuery with expression

We never found a way to do this, just ended up using a Report Query
and batch writing to make it as efficient as possible to do the atomic
inserts...

./tch



On Wed, Mar 30, 2011 at 1:20 PM, Tim Hollosy <hollosyt@xxxxxxxxx> wrote:
> This has got to be a common use case, I'm just not seeing how to do
> this with the API.
>
> I want to take an expression off of a ReadAllQuery, change the select
> values (I'd assume I'd have to use a Report Query)? and insert that
> into a new table.
>
> Example:
>
> insert into employee_tracking
> select 1,'custom_string',e.name from employee
> where employee....
>
>
> So I already have a nice ReadAllQuery representing the select from
> employee, I want to reuse that to do a bulk insert into
> employee_tracking. It's a basic bulk action from a search type
> pattern.
>
> Ideas?
>
> Thanks!
>
> ./tch
>


Back to the top