[thelist] SQL Statement problem

Joshua Olson joshua at alphashop.net
Mon Feb 11 16:35:01 CST 2002


----- Original Message -----
From: "Seth Bienek" <seth at sethbienek.com>
Subject: [thelist] SQL Statement problem

> The problem is that I can't group by an aliased column, right?  So I get
errors.

Seth,

I believe you are correct.  MSSQL 2000 is giving me the same error even when
I use a much more simple query:

SELECT
  approved_date AS mydate,
  COUNT(*) AS myval
FROM applications
GROUP BY mydate

But it works fine if you change the GROUP BY to approved_date.

If I was less tired I could tell you another way around this.

-joshua




More information about the thelist mailing list