retrieving unique records...

Results 1 to 2 of 2

Thread: retrieving unique records...

  1. #1
    Join Date
    Dec 1969

    Default retrieving unique records...

    i have this sql statement<BR><BR>"SELECT orderid,orderdate,pid_ordered,status FROM orders WHERE status &#060;= 2 GROUP BY orderid,orderdate,pid_ordered,status"<BR><BR>where in i am able to retrieve all the records in my orders table. but the problem is my orderid accepts duplicates, so i want to show those duplicates only once. i tried using distinct but it only selects one field:<BR><BR>SELECT distinct orderid FROM orders WHERE status &#060;= 2<BR><BR>but i also need the other fields (orderdate,pid_ordered,status)<BR><BR>?

  2. #2
    Join Date
    Dec 1969

    Default what DBMS?


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts