python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Changing In to Exists in SQL - with DISTINCT
Having this one:
code IN
(
SELECT DISTINCT aaa.code
FROM ORGHEADER AS aaa
LEFT JOIN ORGRELATEDPARTY AS bbb
ON aaa.oh_pk = bbb.parent
WHERE aaa.oh_pk NOT IN
(
SELECT fu.parent
FROM ORGRELATEDP...
Vityata
Votes: 0
Answers: 1
Getting a ANY or ALL Error in Teradata SQL Code
I have a Teradata SQL code
select SUM(col_A)/COUNT(col_A)
from table_A
where col_B in (select col_C from table_B
where col_D in ('1','2','3')
and col_E = 'N'
...
Rogue258
Votes: 0
Answers: 0
expected something between the beginning of the request and the 'IF' keyword error when using IF in TeraData
I am trying to make a "drop if exist" in TeraData with the following statement
SELECT 1
FROM DBC.TABLES
WHERE DatabaseName = 'test1'
AND TableName = 'test2';
IF ACTIVITYCOUNT = 0 THE...
Nicolas Pacheco
Votes: 0
Answers: 0
Teradata Date format converion from varchar to date
I'm stucked somewhere in Teradata date conversion. Can anyone please help, thanks in advance.
Table name is Test2
Table attributes are defined as:
Acct_id Integer,
Date_num Varchar(10) Character ...
Bikash
Votes: 0
Answers: 0