Teradata ^ operator

Posted on 2011-02-11
Last Modified: 2013-11-11
Hi Guys,
I've inherited a program which has some teradata access in it and one part of the query has me stumped as I dont know what it does or how its meant to operate.  

This particular example is on a group by clause  like this with the '^' operator.

GROUP BY 1 , 2 , 3 , 4 , 5 ) chk 
WHERE ( ^ ( CAST( one_id AS INT ) = 9772 
 AND two_id = 12192 ) ) ;

Open in new window


Anyone can unveil what this '^' operator is and does?  It looks like 'NOT'  but I cant confirm it anywhere
Question by:BarryMcGillin
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 60

Expert Comment

by:Kevin Cross
ID: 34873666
My understanding was that is a bitwise operator.  Additionally, every reference I have seen for the Teradata logical operators has the keyword NOT; therefore, 2 sanity checks:

+ Is the results the same if you swap ^ with NOT
+ What do you get with: SELECT 1^1
LVL 13

Accepted Solution

ispaleny earned 500 total points
ID: 34989553
The following comparison operators are Teradata extensions to the ANSI SQL:2008 standard.
Their use is deprecated.


You should use <> instead of ^=.

It looks like ^ is a deprecated Teradata version of NOT operator.

But it is not documented at least since V2R6.0.0(oldest docs available online).

Featured Post

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For cloud, the “train has left the station” and in the Microsoft ERP & CRM world, that means the next generation of enterprise software from Microsoft is here: Dynamics 365 is Microsoft’s new integrated business solution that unifies CRM and ERP fun…
Your data is at risk. Probably more today that at any other time in history. There are simply more people with more access to the Web with bad intentions.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question