using alias in where clause
- Date: Mon, 25 Jan 2016 19:16:03 -0500
- From: Larry Martell <larry.martell@xxxxxxxxx>
- Subject: using alias in where clause
I know I cannot use an alias in a where clause, but I am trying to
figure out how to achieve what I need.
If I could have an alias in a where clause my sql would look like this:
IFNULL(f_tag_ch_y_bottom, NULL))))) as ftag,
WHERE ftag = 'E-CD7'
GROUP BY wafer_id, lot_id
But I can't use ftag in the where clause. I can't put it in a having
clause, as that would exclude the already aggregated rows and I want
to filter then before the aggregation. Anyone have any idea how I can
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql