Re: [SQL] How do you write this query?

2002-10-31 Thread Jean-Luc Lachance
Thank goodness for nested select! select data1 from test where data2 = ( select distinct data2 from test where data1 = 'pooh') and data = 3; JLL Richard Huxton wrote: On Thursday 31 Oct 2002 6:21 pm, Wei Weng wrote: data | data1 | data2 --+---+--- 1 | foo | bar

Re: [SQL] psql history

2002-10-31 Thread Robert Treat
On Mon, 2002-10-28 at 14:57, [EMAIL PROTECTED] wrote: Hi everibody, i have installed Postgres 7.2.2 from a tarball, but using psql i can not have the history of the last command. When i used Postgres from rpm this useful element worked very well! Why that? I didn't see any other response

[SQL] Returning a recordset and filling datatable in a .NET application

2002-10-31 Thread Jonas Wouters
Hi, I have a problem with using .NET and PostgreSQL. In a previous thread called I noticed that it is possible to use and create functions that return tuples or RecordSets. I now want to use them in .NET. I followed the instructions which are available at :

Re: [SQL] Returning a recordset and filling datatable in a .NET

2002-10-31 Thread Achilleus Mantzios
On Thu, 31 Oct 2002, Jonas Wouters wrote: Hi altho i doubt anybody here has any .net experience, i'll give my bet. try to place your sql commands in such a way the the FETCH ALL command is the last in the stream, (that is get rid of begin,commit statements) Hi, I have a problem with using

[SQL] How do you write this query?

2002-10-31 Thread Wei Weng
I have a table Table test Column |Type| Modifiers ++-- data| integer| not null data1 | character varying(128) | not null data2 | character varying(128) | not null (Note: data is NOT the

Re: [SQL] How do you write this query?

2002-10-31 Thread Richard Huxton
On Thursday 31 Oct 2002 6:21 pm, Wei Weng wrote: data | data1 | data2 --+---+--- 1 | foo | bar 2 | greg | bar 3 | pooh | bar 4 | dah | peng I need a query that returns me the data1 that satisfies the logic of the following pseudo code: 1: select data2

Re: [SQL] How do you write this query?

2002-10-31 Thread Achilleus Mantzios
On 31 Oct 2002, Wei Weng wrote: and yet another equivalent query: SELECT f1.data1 from test f1,test f2 where f1.data=3 and f1.data2 = f2.data2 and f2.data1='pooh'; I have a table Table test Column|Type| Modifiers