Re: [SQL] select question

2002-08-28 Thread eric soroos
On Wed, 28 Aug 2002 16:12:41 -0400 in message <[EMAIL PROTECTED]>, george young <[EMAIL PROTECTED]> wrote: > [postgreql 7.2, linux] > I have a table T with columns run, wafer, and test: >T(run text, wafer int, test text) > Given a run and a set of wafers, I need the set of tests that match >

Re: [SQL] select question

2002-08-28 Thread Wei Weng
You can use this query SELECT * FROM T WHERE run = 'a' AND wafer = 1 AND test = 'foo' UNION SELECT * FROM T WHERE run = 'a' AND wafer = 2 AND test = 'foo' UNION SELECT * FROM T WHERE run = 'a' AND wafer = 3 AND test = 'foo' UNION SELECT * FROM T WHERE run = 'a' AND

[SQL] select question

2002-08-28 Thread george young
[postgreql 7.2, linux] I have a table T with columns run, wafer, and test: T(run text, wafer int, test text) Given a run and a set of wafers, I need the set of tests that match *all* the specified wafers: run wafer test a 1 foo a 2 foo a 3 foo a

Re: [SQL] Select question

2001-05-23 Thread Tom Lane
"Chris Ruprecht" <[EMAIL PROTECTED]> writes: > phone=# select * from phonelog where cdate > 2001-05-18 order by cdate limit > 2 ; Try select * from phonelog where cdate > '2001-05-18' order by cdate limit 2 I think it's interpreting your query as where cdate > 1978 (result of integer subexpress

Re: [SQL] Select question

2001-05-23 Thread Stephan Szabo
I'm not sure, but... Does it work if you say cdate > '2001-05-18' ? (Possibly ::date too) I'd guess your date value you're trying to put there is getting treated as an integer expression. On Wed, 23 May 2001, Chris Ruprecht wrote: > Hi all, > > although not new to databases, I'm new to the wo

[SQL] Select question

2001-05-23 Thread Chris Ruprecht
Hi all, although not new to databases, I'm new to the wonderful world of PostGreSQl and SQL in general. Question: I do this query phone=# select * from phonelog where cdate > 2001-05-18 order by cdate limit 2 ; And I get theis result cdate| ctime | countrycode | success | carrier | dura