Re: comparing the result of two comparisions
From: oj (nospam_ojngo_at_home.com)
Date: 01/17/05
- Next message: oj: "Re: Intra-query Parallelism Problem"
- Previous message: oj: "Re: Challenging Query"
- In reply to: Zeng: "comparing the result of two comparisions"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 17 Jan 2005 12:28:01 -0800
See previous post for the trick with Bitwise AND.
"Zeng" <Zeng5000@hotmail.com> wrote in message
news:%23WRkDCN$EHA.2180@TK2MSFTNGP10.phx.gbl...
> Hello,
>
> I can't find a way to compare the results of two comparisions. Would
> someone know how to get one of the following methods work? Maybe some
> kind
> of setting that I need to turn on/off to allow it? Most langugages I used,
> this is just another comparision of 2 boolean values, but somehow Sql
> doesn't allow it. Thanks for your help!
>
> select *
> from My_Dummy_Table
> where ( 3 > 2 ) = ( 4 > 2 )
>>>> Server: Msg 170, Level 15, State 1, Line 3
>>>> Line 3: Incorrect syntax near '='.
>
> select case when ( 3 > 2 ) = ( 4 > 2 ) then 1 else 0 end
>>>>Server: Msg 170, Level 15, State 1, Line 1
>>>> Line 1: Incorrect syntax near '='.
>
>
- Next message: oj: "Re: Intra-query Parallelism Problem"
- Previous message: oj: "Re: Challenging Query"
- In reply to: Zeng: "comparing the result of two comparisions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|