RE: SQL: Aliases in where clauses.

2000-12-16 Thread Joe Sheble aka Wizaerd
= -Original Message- From: Michael Thomas [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 16, 2000 2:11 AM To: CF-Talk Subject: RE: SQL: Aliases in where clauses. I saw you had an aggregate function within your example but you said nothing about using a TABLE ALIAS

RE: SQL: Aliases in where clauses.

2000-12-16 Thread Michael Thomas
an aggregate function before. In that case the answer is no, you cant do it you might have to like you said code out 2 seperate queries. From: "Joe Sheble aka Wizaerd" [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: RE: SQL: Aliases in where clauses. Dat

SQL: Aliases in where clauses.

2000-12-15 Thread Chris Martin
Hi all. I was wondering, is it possible to use aliases in an sql where clause? We recently reorganized a bunch of data into new tables, and I am having to go back and update the templates that get data from the old tables, so that they get data from the new tables. Example: cfquery

Re: SQL: Aliases in where clauses.

2000-12-15 Thread Joe Sheble aka Wizaerd
Unfortunately, aliases are not available in a WHERE clause.. I've asked this before in various different places, and the response has always been the same. At 01:17 PM 12/15/00 -0500, you wrote: Hi all. I was wondering, is it possible to use aliases in an sql where clause? We recently

Re: SQL: Aliases in where clauses.

2000-12-15 Thread Jeffry Houser
That is some select statement. I've used aliases (for both tables and fields) in the where clause in SQL Server 7, and 2000. You didn't mention what database you were using, although I don't think that should make a difference. Chris Martin wrote: Hi all. I was wondering, is it

Re: SQL: Aliases in where clauses.

2000-12-15 Thread mark_wimer
Chris, As far as I know, aliases are not allowed in SQL 7 where clauses. Nothing about the BOL suggests that as an option either. But, it looks like an aggregate query since you're using MIN and so on, suggesting you might look into a "having" clause. (Although I don't see a "group by" clause,

Re: SQL: Aliases in where clauses.

2000-12-15 Thread Michael Thomas
They've worked for me numerous times. From: Joe Sheble aka Wizaerd [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: CF-Talk [EMAIL PROTECTED] Subject: Re: SQL: Aliases in where clauses. Date: Fri, 15 Dec 2000 13:19:54 -0700 Unfortunately, aliases are not available in a WHERE clause.. I've

Re: SQL: Aliases in where clauses.

2000-12-15 Thread Jeffry Houser
Jeffry Houser wrote: That is some select statement. I've used aliases (for both tables and fields) in the where clause in SQL Server 7, and 2000. You didn't mention what database you were using, although I don't think that should make a difference. Someone else said they weren't

RE: SQL: Aliases in where clauses.

2000-12-15 Thread Joe Sheble aka Wizaerd
Canvas, 3D, Graphics, ColdFusion, PHP, and mySQL http://www.wizaerd.com = -Original Message- From: Michael Thomas [mailto:[EMAIL PROTECTED]] Sent: Friday, December 15, 2000 6:30 PM To: CF-Talk Subject: Re: SQL: Aliases in where clauses. They've