it seems teradata doesn't support != as not equal, right?

Database
Fan

it seems teradata doesn't support != as not equal, right?

Hi all,

       I have try the command Column_name != Value in where clause, but teradata alerts error [3707: 42000] expected something like an 'IN' keyword or a 'CONTAINS' keyword between the word 'RETAIL_PRICE' and '|'.

       I have check the Basic Teradata Query Reference, it does show condittion != as not equal to. but why it alerts error? Actually it works if I change != to NE.

       Can anyone helps? Thank you!

5 REPLIES
Senior Supporter

Re: it seems teradata doesn't support != as not equal, right?

try <> instead of !=

Senior Supporter

Re: it seems teradata doesn't support != as not equal, right?

from the documentation


<>


^=


NE


NOT=


Tests for inequality.

Fan

Re: it seems teradata doesn't support != as not equal, right?

Ok, ulrich. Thank you for your help.

Re: it seems teradata doesn't support != as not equal, right?

 can we use Not IN if we want to see a row whci is not present in other table Ex;- Examine some of the rows in the trnsact table that are not in the skstinfo table?

Select a.sku,b.sku

From trnsact a JOIN skstinfo b

ON a.sku NOT IN  b.sku ;

Is this acceptable?

Enthusiast

Re: it seems teradata doesn't support != as not equal, right?

A left outer join will work as well.