Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-26 Thread BareFeet
Hi Leo, > insert into 'tblName' Values (NULL, 'five'); > create table 'tblRefMaxName' ('ref' integer, 'nn' text); > insert into 'tblRefMaxName' Values (select max(id) from tblName, > 'eins'); Apart from the responses already from other posters, you should use the correct quotes for entities (

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 11:34 AM, P Kishor wrote: > On Tue, Feb 24, 2009 at 6:12 PM, John Machin wrote: >> On 25/02/2009 10:30 AM, P Kishor wrote: >>> On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag >>> wrote: Hallo, I'm trying to insert the highest value of tblName into tblZO. There

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 6:12 PM, John Machin wrote: > On 25/02/2009 10:30 AM, P Kishor wrote: >> >> On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag >> wrote: >>> >>> Hallo, >>> >>> I'm trying to insert the highest value of tblName into tblZO. >>> >>> There fore I followed the hints in this article .

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 10:30 AM, P Kishor wrote: > On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag wrote: >> Hallo, >> >> I'm trying to insert the highest value of tblName into tblZO. >> >> There fore I followed the hints in this article ... >> http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-r

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 5:35 PM, John Machin wrote: > On 25/02/2009 10:19 AM, Leo Freitag wrote: >> Hallo, >> >> I'm trying to insert the highest value of tblName into tblZO. >> >> There fore I followed the hints in this article ... >> http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserte

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread John Machin
On 25/02/2009 10:19 AM, Leo Freitag wrote: > Hallo, > > I'm trying to insert the highest value of tblName into tblZO. > > There fore I followed the hints in this article ... > http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514.html#a190

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread Igor Tandetnik
Leo Freitag wrote: > sqlite> insert into 'tblRefMaxName' Values (select max(id) from > tblName, 'eins') > ; insert into tblRefMaxName select max(id), 'eins' from tblName; Igor Tandetnik ___ sqlite-users mailing list sqlite-users@sqlite.org http://s

Re: [sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread P Kishor
On Tue, Feb 24, 2009 at 5:19 PM, Leo Freitag wrote: > > Hallo, > > I'm trying to insert the highest value of tblName into tblZO. > > There fore I followed the hints in this article ... > http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514

[sqlite] Error on INSERT with SELECT Max(id) FROM ...

2009-02-24 Thread Leo Freitag
Hallo, I'm trying to insert the highest value of tblName into tblZO. There fore I followed the hints in this article ... http://www.nabble.com/How-to-use-the-ROWID-of-the-last-inserted-row-for-FK-insert-into-other-tables--td19085514.html#a19085514 ... but I got a error (see below) SQLite versi