[Zope] ZSQL Method question
Kevin Lewandowski
kevin@zinkmedia.com
Tue, 11 Jun 2002 15:12:43 -0700
This is a SQL-specific thing.. nothing to do with zope.
I think you can do this with MySQL with the insert/select
combination.
INSERT INTO TABLE (columns,,,) SELECT columns,,, FROM ....
The two column lists have to match. check the mysql manual
for the exact syntax.
On Tue, Jun 11, 2002 at 03:00:40AM -0700, Aseem Mohanty wrote:
> Is it possible to run a SELECT query (just one - as per doc) in a ZSQL
> Method and then use the results of that to run a INSERT query in the
> "same" ZSQL method... If yes how do I access the result of the select??
>
> I am just trying to get around the lack of sub-queries in MySQL. and
> dont really want to set up a ZSQL method for each query/insert and then
> use another method to bring them all together.
>
> However if there is another way to do the whole thing.......I would be
> immensely grateful for any pointers in that direction.
>
> TIA
> AM
>
> --
> ==================================================================
> Aseem Mohanty
> Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706
> (R) 510 7696011 (M) 510 3014871 (O) 510 5279231
> ==================================================================
> "I saw `cout' being shifted "Hello world" times to the left and
> stopped right there!!" -- Steve Gonedes
> ==================================================================
>
>
>
>
> _______________________________________________
> Zope maillist - Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )