Jump to content

Please Help Me On This Below


massmaharaj

Recommended Posts

SELECT DISTINCT PROCESS_NM FROM smismgr.etl_job_status where trunc(end_dt)=trunc(sysdate) and status='c' and process_nm in
(select DISTINCT * from (select case
when a.process_nm in ('x' , 'y') then a.process_nm in ('x' , 'y')
when ( a.process_nm NOT IN ('y') and a.process_nm = 'x' )then a.process_nm in ('x')
WHEN ( a.process_nm NOT IN ('x') and a.process_nm = 'y' )then Null
end process_nm from smismgr.etl_job_status a where trunc(end_dt)=trunc(sysdate) and status='c'))


is this correct

Link to comment
Share on other sites

oka table lo process_nm ane column untundhi

x is a record and y is a record too

x is related to y

x is a process name

y is process name

i need to write a sql that

if x and y are there out put should be x and y

if x is there and y is not there , output get only x

if x is not there and y is there , it should put null

if x is not there and y is not there then it should put null
please help me in this how to write a sql

Link to comment
Share on other sites

aa query denikosam raasavo cheppu bhaiyya.... what is the purpose.....
question cheppakunda answer chepthe.... em ardam avthadi....

Link to comment
Share on other sites

[quote name='Silver_mani' timestamp='1331606362' post='1301509876']
endi bhayya Fact table ni Dimension tho join chestunnava ???
[/quote]mama you are too intellligent.,,.

Link to comment
Share on other sites

x etl process complete x record name insert avuthundi , x insert ayaaka , y process check chesthundi

y process check chesetappudu aa condition tho sql pettali

Link to comment
Share on other sites

[quote name='dirty kid' timestamp='1331606813' post='1301509893']
mama you are too intellligent.,,.
[/quote]



endi baa ala thengutavu ... tappu aithe cheppochhu kada [img]http://lh3.ggpht.com/_vGgr3WUJEdg/SluHFWTirWI/AAAAAAAAA5o/xaom4gsaCvQ/s128/bemmmi.gif[/img]

Link to comment
Share on other sites

SELECT DISTINCT PROCESS_NM
FROM smismgr.etl_job_status
where trunc(end_dt)=trunc(sysdate)
and status='c'
and process_nm in
(
select DISTINCT * from (
select case
when a.process_nm in ('x' , 'y') then a.process_nm in ('x' , 'y')
when ( a.process_nm NOT IN ('y') and a.process_nm = 'x' )then a.process_nm in ('x')
WHEN ( a.process_nm NOT IN ('x') and a.process_nm = 'y' )then Null
end process_nm
from smismgr.etl_job_status a
where trunc(end_dt)=trunc(sysdate) and status='c'))

nenu emi analedhu mama......

[quote name='Silver_mani' timestamp='1331607547' post='1301509923']



endi baa ala thengutavu ... tappu aithe cheppochhu kada [img]http://lh3.ggpht.com/_vGgr3WUJEdg/SluHFWTirWI/AAAAAAAAA5o/xaom4gsaCvQ/s128/bemmmi.gif[/img]
[/quote]

Link to comment
Share on other sites

×
×
  • Create New...