I have a condition where I need to check number of rows returned by select query in Teradata.
My query looks like below
select
PDate ,Risk ,BName ,BNumber ,
ONumber ,OnNumber ,ID_CD ,Entity ,
AU ,RType, count (*)
from Load_one.import_test
group by 1,2,3,4,5,6,7,8,9,10
having count (*) > 1;
So I would like to know the count of rows it returns. I tried something like below
Select Count(*)
From ( select
PDate ,Risk ,BName ,BNumber ,
ONumber ,OnNumber ,ID_CD ,Entity ,
AU ,RType, count (*)
from Load_one.import_test
group by 1,2,3,4,5,6,7,8,9,10
having count (*) > 1;
) as temp
It returning an error: select failed 3707 expected something like an 'EXCEPT' keyword or an 'UNION' keyword or a 'MINUS' keyword between an integer and ;
Please help me.
having count(*) > 1
, that is all. - Tim Biegeleisen