Re: SET @var and insert that as cunting var into table with insertselect

2007-02-05 Thread Dušan Pavlica
Barry napsal(a): Dušan Pavlica schrieb: Barry napsal(a): Hello Everyone! I am having a big problem with counting inserting rows. This is my Query: SELECT MAX(id) INTO @maxid FROM table1; // @maxid is now 44 INSERT INTO table2 (orderid, someothervars) SELECT @maxid +1, blahvar FROM

Re: SET @var and insert that as cunting var into table with insertselect

2007-02-02 Thread Barry
Dušan Pavlica schrieb: Barry napsal(a): Hello Everyone! I am having a big problem with counting inserting rows. This is my Query: SELECT MAX(id) INTO @maxid FROM table1; // @maxid is now 44 INSERT INTO table2 (orderid, someothervars) SELECT @maxid +1, blahvar FROM table3; try select