All Forums Database
charon 2 posts Joined 02/12
09 Feb 2012
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!

ulrich 816 posts Joined 09/09
09 Feb 2012

try <> instead of !=

 

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

ulrich 816 posts Joined 09/09
10 Feb 2012

from the documentation

 

<>

^=

NE

NOT=

 

Tests for inequality.

feel free to donate bitcoin:12kgAUHFUqvG2sQgaRBXFhCwyf9HXdkGud

charon 2 posts Joined 02/12
12 Feb 2012

Ok, ulrich. Thank you for your help.

rahul1987 3 posts Joined 06/16
28 Jun 2016

 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?

 

VandeBergB 182 posts Joined 09/06
28 Jun 2016

A left outer join will work as well.

Some drink from the fountain of knowledge, others just gargle.

You must sign in to leave a comment.