Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Posts
    2

    Unanswered: Combining 2 SELECT statments

    i have two select statements that i need combined into one to display the proper formated data

    1) SELECT * FROM sales WHERE Statues = 'Open' or Statues = 'Hold' ORDER BY Date,OrderNum

    2) SELECT OrderNum, count( * ) AS Titems
    FROM sales
    GROUP BY OrderNum

    how would i go about combining the query?

  2. #2
    Join Date
    Oct 2002
    Posts
    10
    SELECT Date,OrderNum, count( * ) AS Titems
    FROM sales
    WHERE Statues = 'Open' or Statues = 'Hold'
    GROUP BY Date,OrderNum
    ORDER BY Date,OrderNum

    Is that what you mean?

  3. #3
    Join Date
    Sep 2003
    Posts
    2
    yup, that is what i was looking for, thanks.

Posting Permissions

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