SQL question

From: <dennishancy_at_eaton.com>
Date: Wed, 26 Jan 2000 19:56:05 GMT
Message-ID: <86njgi$qg5$1_at_nnrp1.deja.com>


In the SQL statement:

[Quoted] select a+b+c+d "answer" from some_table;

I want to only include those records where the sum a+b+c+d > 0.

So I simply add the clause

"where a+b+c+d > 0"

But suppose I'm lazy (the column names are never as easy to type as a, b, c, and d). Is there some other way to refer to this equation?

I tried using its alias (answer) in the where clause but the didn't work. Any suggestions?

Dennis Hancy
Eaton Corporation
Cleveland, OH

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jan 26 2000 - 20:56:05 CET

Original text of this message