Re: [sqlite] Automatically create a TreeNode?

2012-11-01 Thread Gert Van Assche
Clemens, not any teacher could have explained this any better! Thanks gert 2012/11/1 Clemens Ladisch > Gert Van Assche wrote: > > 2012/10/31 Clemens Ladisch > >> UPDATE World > >> SET TreeNode = CAST((SELECT COUNT(DISTINCT Continent) > >>

Re: [sqlite] Automatically create a TreeNode?

2012-11-01 Thread Clemens Ladisch
Gert Van Assche wrote: > 2012/10/31 Clemens Ladisch >> UPDATE World >> SET TreeNode = CAST((SELECT COUNT(DISTINCT Continent) >> FROM World w2 >> WHERE w2.Continent <= World.Continent) AS TEXT); > > this "w2" table you are using, what

Re: [sqlite] Automatically create a TreeNode?

2012-10-31 Thread Gert Van Assche
Clemens, This is wonderful... I have no clue how it works, but it works. this "w2" table you are using, what is this and where do you get it from? In any case, thanks for your help. gert 2012/10/31 Clemens Ladisch > Gert Van Assche wrote: > > I have a table like this

Re: [sqlite] Automatically create a TreeNode?

2012-10-31 Thread Clemens Ladisch
Gert Van Assche wrote: > I have a table like this one: > > CREATE TABLE [WORLD] ([Continent] , [Region] , [Country] , [TreeNode] CHAR); > insert into [WORLD] values('America', null, null, '1'); > insert into [WORLD] values('America', 'North', null, '1.1'); > insert into [WORLD] values('America',