On Monday 27 October 2003 21:35, Josh Berkus wrote:
> Alexander,
>
> > > BEGIN;
> > > DECLARE total CURSOR
> > > FOR SELECT=20
> > > SUBSTR(datetime,1,7)||'-01 00:00:00' as month,
> > > client,
> > > SUM(money)
> > > FROM stat
> > > WHERE SUBSTR(datetime,1,7)=3D'2003-10'
> > > GROUP BY mo
Alexander,
> > BEGIN;
> > DECLARE total CURSOR
> > FOR SELECT=20
> > SUBSTR(datetime,1,7)||'-01 00:00:00' as month,
> > client,
> > SUM(money)
> > FROM stat
> > WHERE SUBSTR(datetime,1,7)=3D'2003-10'
> > GROUP BY month,client;
> > DELETE FROM stat WHERE SUBSTR(datetime,1,7)=3D'2003-10';
>
> Please CC me, I am not subscribed.
>
> An imaginary SQL statement
> INSERT INTO table FETCH ... FROM cursor;
> looks almost the same as currently available
> INSERT INTO table SELECT ...;
>
> I tried it because I needed to insert a row in a table
> after I DELETEd a set of rows, something li
Please CC me, I am not subscribed.
An imaginary SQL statement
INSERT INTO table FETCH ... FROM cursor;
looks almost the same as currently available
INSERT INTO table SELECT ...;
I tried it because I needed to insert a row in a table
after I DELETEd a set of rows, something like this:
BEGIN;
DECL