I was trying to convert the connect by level function of oracle to teradata. I have seen many examples over the net but this particular one is different,
(SELECT
CASE LEVEL
WHEN 1 THEN 'MB'
WHEN 2 THEN 'SB'
ELSE 'TOTAL'
END AS DRUG_SOURCE
FROM
DUAL
CONNECT BY LEVEL <= 3) RW
Please let me know if you guys have any idea.
Hey I found the solution for this. Sorry I couldn't explain my question clearly.
The below code would work exactly the way i wanted in teradata
select 'MB' as DRUG_SOURCE from dual
union
select 'SB' as DRUG_SOURCE from dual
Union
select 'TOTAL' as DRUG_SOURCE from dual