Re: [GENERAL] Syntax problem for a newbie

2006-05-05 Thread Tom Lane
Russ Brown <[EMAIL PROTECTED]> writes: > On Fri, 2006-05-05 at 12:49 -0400, Tom Lane wrote: >> "Fred" <[EMAIL PROTECTED]> writes: >>> SELECT g.id, t1.name, substring(g.path, 1, (6*(-1+l.id)) + 5) as >>> subpath,l.id-1 as level >>> FROM graph_path g >>> INNER JOIN term AS t1 >>> INNER JOIN term AS

Re: [GENERAL] Syntax problem for a newbie

2006-05-05 Thread Russ Brown
On Fri, 2006-05-05 at 12:49 -0400, Tom Lane wrote: > "Fred" <[EMAIL PROTECTED]> writes: > > I have a syntax problem but I don't find the clue. > > Actually I adapt an mySQL query to a postgreSQL but I got a message > > error that I can't interpret. > > > SELECT g.id, t1.name, substring(g.path, 1,

Re: [GENERAL] Syntax problem for a newbie

2006-05-05 Thread Tony Caduto
Fred wrote: Dear all, I have a syntax problem but I don't find the clue. Actually I adapt an mySQL query to a postgreSQL but I got a message error that I can't interpret. SELECT g.id, t1.name, substring(g.path, 1, (6*(-1+l.id)) + 5) as The thing that stands out to me is the syntax for the su

Re: [GENERAL] Syntax problem for a newbie

2006-05-05 Thread Tom Lane
"Fred" <[EMAIL PROTECTED]> writes: > I have a syntax problem but I don't find the clue. > Actually I adapt an mySQL query to a postgreSQL but I got a message > error that I can't interpret. > SELECT g.id, t1.name, substring(g.path, 1, (6*(-1+l.id)) + 5) as > subpath,l.id-1 as level > FROM graph_p

[GENERAL] Syntax problem for a newbie

2006-05-05 Thread Fred
Dear all, I have a syntax problem but I don't find the clue. Actually I adapt an mySQL query to a postgreSQL but I got a message error that I can't interpret. SELECT g.id, t1.name, substring(g.path, 1, (6*(-1+l.id)) + 5) as subpath,l.id-1 as level FROM graph_path g INNER JOIN term AS t1