how does one use calculated variable names(not sure if this is what they are
called) in queries, later on in the query?

ie.

select count(tony) as tonysCount, sum(jayme) as jaymesCount
from orders
where tony = tony
HAVING
Abs((tonysCount-jaymesCount)/tonysCount) > 0

the problem is im getting an error like....

Server: Msg 207, Level 16, State 3, Line 1
Invalid column name 'tonysCount'.
Server: Msg 207, Level 16, State 1, Line 1
Invalid column name 'jaymesCount'.

(which tony minus jayme would mean im not married anymore so it would always
= 0 :) or would my count go up...hee hee hee, just kidding..

thanks...

...tony

tony weeg
senior web applications architect
navtrak, inc.
www.navtrak.net
[EMAIL PROTECTED]
410.548.2337

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to