Scott Haneda <[EMAIL PROTECTED]> wrote:
> There are some things I do in mysql often, is there some way to alias or
> otherwise bookmark a a sql statement for simple rapid use in the future?
You can put SQL statements to the file and then execute them from the file.
--
For technical support con
lto:[EMAIL PROTECTED]
Sent: Monday, November 10, 2003 7:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Aliases
what if we use the function at the right side of the equation?
such as
select anything
from table1, table2
where table1.id=left(table2.id,somenumber)
having both id in table were indexed
dont yo
-
From: Erik Osterman
To: [EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 3:17 AM
Subject: RE: Aliases
> From: Matt W [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 5:47 PM
> To: Erik Osterman; [EMAIL PROTECTED]
> No, Roger's method can't use
> From: Matt W [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 10, 2003 5:47 PM
> To: Erik Osterman; [EMAIL PROTECTED]
> No, Roger's method can't use an index. :-) But yes, using WHERE is
> better than HAVING.
Ah... right indeed. In this case it wouldn't work. My mistake... :)
> To get the
#x27;;
And I would guess that LIKE will be faster than the LEFT() function even
if there is no index.
Matt
- Original Message -
From: "Erik Osterman"
Sent: Tuesday, November 11, 2003 6:39 AM
Subject: RE: Aliases
However, you can use HAVING. HAVING is post-processed, in a br
Regards,
Erik Osterman
-Original Message-
From: Roger Baklund [mailto:[EMAIL PROTECTED]
Sent: Sunday, November 09, 2003 6:59 AM
To: [EMAIL PROTECTED]
Cc: David Katz
Subject: Re: Aliases
* David Katz
> I am trying to do a select statement where I am using one of the
> aliases in the
* David Katz
> I am trying to do a select statement where I am using one of the
> aliases in the where clause. I keep getting an error that the field
> does not exist.
>From the manual: "Note that standard SQL doesn't allow you to refer to an
alias in a WHERE clause. This is because when the WHER