Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Please, a XOR operator in T-SQL on Yukon.

52 views
Skip to first unread message

Javier Álvarez

unread,
Feb 2, 2004, 7:16:30 AM2/2/04
to
Please, a XOR operator in T-SQL on Yukon.

Thanks,
Javier Álvarez.
Madrid. SPAIN. Europe.


Narayana Vyas Kondreddi

unread,
Feb 2, 2004, 8:58:07 AM2/2/04
to
Are you asking if there's an XOR in T-SQL? If so, yes, see "^ (Bitwise
Exclusive OR)" in SQL Server Books Online.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm


"Javier Álvarez" <jav...@delete.mantis-informatica.es> wrote in message
news:%23$7jdZY6D...@tk2msftngp13.phx.gbl...

Cliff Harris

unread,
Feb 2, 2004, 11:30:35 AM2/2/04
to
I don't think that he's refering to a bit-wise XOR.. I think he would like a
SQL operator that is XOR... like

SELECT * FROM users
where firstname = 'Larry' XOR lastname = 'Smith'

While helpful, a bit of logic conversion can get you the same thing:

SELECT * FROM users
WHERE (firstname = 'Larry' AND lastname != 'Smith) OR (firstname != 'Larry'
AND lastname = 'Smith')

-Cliff

"Narayana Vyas Kondreddi" <answ...@hotmail.com> wrote in message
news:u1eeQSZ6...@tk2msftngp13.phx.gbl...

Louis Davidson

unread,
Feb 2, 2004, 11:52:40 AM2/2/04
to
I think he means a logical operator. as in OR, AND, XOR, etc. Send to
sql...@microsoft.com, not likely to get any motion around here.

--
----------------------------------------------------------------------------
-----------
Louis Davidson (dr...@hotmail.com)
Compass Technology Management

Pro SQL Server 2000 Database Design
http://www.apress.com/book/bookDisplay.html?bID=266

Note: Please reply to the newsgroups only unless you are
interested in consulting services. All other replies will be ignored :)

"Narayana Vyas Kondreddi" <answ...@hotmail.com> wrote in message
news:u1eeQSZ6...@tk2msftngp13.phx.gbl...

Javier Álvarez

unread,
Feb 2, 2004, 2:42:19 PM2/2/04
to
Yes, I refer to a SQL Operator like

SELECT * FROM users
where firstname = 'Larry' XOR lastname = 'Smith'

because is more simple and easy than

SELECT * FROM users
WHERE (firstname = 'Larry' AND lastname != 'Smith) OR (firstname != 'Larry'
AND lastname = 'Smith')

and today, all languages have a XOR Operator.

Thanks,
Javier Álvarez.
Madrid, SPAIN.

"Cliff Harris" <he...@myrealbox.com> escribió en el mensaje
news:eDzeana6...@TK2MSFTNGP10.phx.gbl...

0 new messages