Re: [SQL] SQL Newbie

2005-08-12 Thread Nick Stone
Hope this helps SELECT * FROM speed_history as outside etc.. WHERE (speed = ( SELECT speed FROM speed_history as inside etc.. WHERE (outside.interface = i

Re: [SQL] How to alias table columns in result?

2005-08-11 Thread Nick Stone
Yes - just alias the columns you need to alias Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of nori Sent: 11 August 2005 10:48 To: Mischa Sandberg Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] How to alias table columns in result? Thanks Sorry,

Re: [SQL] left joins

2005-07-06 Thread Nick Stone
I've had exactly yhe same problem - try changing the query to. select count(*) from h left join p using (r,pos) and p.r_order=1 where h.tn > 20 and h.tn < 30 I think that should do it - the syntax you used would work in Oracle and MS SQL but there's a subtle difference with the way Postgres wor

Re: [SQL] Recursive function

2005-07-04 Thread Nick Stone
Hi, Also you could take a look at the connectby function as this will do what you want with ease and it can be used to sort stuff at the same time, produce tree views of data etc. Nick -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gnanavel Shanmugam S

Re: [SQL] Some help please

2005-07-01 Thread Nick Stone
That's great - thanks very much Nick -Original Message- From: Josh Berkus [mailto:[EMAIL PROTECTED] Sent: 01 July 2005 18:30 To: Nick Stone Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] Some help please Nick, > I'm interested in using the connectby() function which

[SQL] Some help please

2005-07-01 Thread Nick Stone
Hi, I'm interested in using the connectby() function which I gather from the lists can be used in a similar way to the Oracle connect by ... PRIOR functionality. Does anybody know where there's an example of this in use or better still could somebody post an example. Many thanks Nick

Re: [SQL] SQL Query question

2005-06-30 Thread Nick Stone
Thanks for the reply at least that explains it. Nick -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: 30 June 2005 12:22 To: Nick Stone Cc: pgsql-sql@postgresql.org Subject: Re: [SQL] SQL Query question Nick Stone wrote: > Hi > > Whilst I'm not n

[SQL] SQL Query question

2005-06-30 Thread Nick Stone
Hi Whilst I'm not new to SQL I am reasonably new to Postgres and as such I have a question on the following query: SELECT tbl1."TermTypeID", tbl1."ParentID", tbl1."KeywordID", tbl1."Term", tbl2."KeywordID" FROM "Terms" As tbl1 LEFT JOIN "SearchStore" As tbl2 ON tbl1."K