Using AND in query

From: aravind chandu <avin_friends(at)yahoo(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Using AND in query
Date: 2010-08-07 19:40:41
Message-ID: 853899.68325.qm@web31405.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello every one,

I have encountered a problem while working .I have a sample table with the
following data

TID Date Item
T100 8/1/2010 Laptop
T100 8/1/2010 Desktop
T101 8/1/2010 Laptop
T102 8/1/2010 Desktop
T103 8/2/2010 Laptop
T103 8/2/2010 Desktop
T104 8/2/2010 Laptop
 
need the data when a person bought laptop & desktop on the sameday.I
used a condition in where clause but its not working,it is returning no rows.Can
any one please help me to resolve this issue ?

condition in where clause :
table.date in date() to date() and table.item = "laptop" and table.item =
"Desktop"

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raymond O'Donnell 2010-08-07 21:10:54 Re: Using AND in query
Previous Message Pavel Stehule 2010-08-07 17:40:50 Re: MySQL versus Postgres