DAL doesn't allow you to do that. Either you code it with bulk_insert or 
with a loop of db.table.insert ot with executesql.

On Tuesday, January 28, 2014 2:27:27 PM UTC+1, Dragan Matic wrote:
>
> Sorry but I have read there and all I can see is simple insert and 
> bulk_insert, neither of them are insert..select. 
>
> On Tuesday, January 28, 2014 1:48:10 PM UTC+1, Paolo Valleri wrote:
>>
>> of course you can, I suggest to read here 
>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#insert
>>
>> On Tuesday, January 28, 2014 1:39:34 PM UTC+1, Dragan Matic wrote:
>>>
>>> Is there a way to do insert.. select with DAL? I would like to do 
>>> something like this:
>>>
>>> insert into table1 (col1, col2, col3, col4)
>>> select col5, col6, 'val1', 'val2' from table2 where col5 = 'val3'
>>>
>>> Thanks
>>>
>>> Dragan
>>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to