Re: [web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-20 Thread Val K
Keep in mind, that you can generate  select-part of query (as string) using 
*db(...)._select(...)*
, 

On Wednesday, October 17, 2018 at 12:36:43 AM UTC+3, icodk wrote:
>
> Thanks Carlos.
> I am going to loop through it
>
> On Tuesday, October 16, 2018 at 9:43:13 PM UTC+2, Carlos Costa wrote:
>>
>> I think it is not possible yet.
>> If you don't care about performance, in this case you can do it by code.
>> But if you care, use db.executesql...
>>
>> Em sex, 12 de out de 2018 às 12:44, icodk  escreveu:
>>
>>> something like :
>>>
>>> INSERT INTO Customers (CustomerName, City, Country)
>>> SELECT SupplierName, City, Country FROM Suppliers
>>> WHERE Country=1;
>>>
>>>
>>> -- 
>>> 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 web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> -- 
>> At.
>>
>> Carlos J. Costa
>> --
>> Cientista da Computação - Esp. Gestão em Telecom
>>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-16 Thread icodk
Thanks Carlos.
I am going to loop through it

On Tuesday, October 16, 2018 at 9:43:13 PM UTC+2, Carlos Costa wrote:
>
> I think it is not possible yet.
> If you don't care about performance, in this case you can do it by code.
> But if you care, use db.executesql...
>
> Em sex, 12 de out de 2018 às 12:44, icodk > 
> escreveu:
>
>> something like :
>>
>> INSERT INTO Customers (CustomerName, City, Country)
>> SELECT SupplierName, City, Country FROM Suppliers
>> WHERE Country=1;
>>
>>
>> -- 
>> 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 web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> At.
>
> Carlos J. Costa
> --
> Cientista da Computação - Esp. Gestão em Telecom
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-16 Thread Carlos Costa
I think it is not possible yet.
If you don't care about performance, in this case you can do it by code.
But if you care, use db.executesql...

Em sex, 12 de out de 2018 às 12:44, icodk  escreveu:

> something like :
>
> INSERT INTO Customers (CustomerName, City, Country)
> SELECT SupplierName, City, Country FROM Suppliers
> WHERE Country=1;
>
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>


-- 
At.

Carlos J. Costa
--
Cientista da Computação - Esp. Gestão em Telecom

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Can I do INSERT INTO statement with DAL syntax ?

2018-10-12 Thread icodk
something like :

INSERT INTO Customers (CustomerName, City, Country)
SELECT SupplierName, City, Country FROM Suppliers
WHERE Country=1;


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.