1
select FCPDD.AUDIENCE_ID,FCPD.APPLICATION_RULE_ID,FCPD.PROGRAMME_PART,FCPD.TARGET_DATE,FCPD.TIMEBAND_START_TIME,
FCPD.TIMEBAND_END_TIME,FCPD.DAY_NUMBER
FROM FPR_CHANNEL_PROCESS_DATA FCPD,FPR_CHANNEL_PROCESS_DATA_DTL FCPDD 
WHERE FCPD.CHANNEL_PROCESS_DATA_ID=FCPDD.CHANNEL_PROCESS_DATA_ID and FCPD.TARGET_DATE is not null and FCPDD.AUDIENCE_ID is not null 
and FCPD.APPLICATION_RULE_ID is not null and FCPD.PROGRAMME_PART is not null and FCPD.TIMEBAND_START_TIME is not null
and FCPD.TIMEBAND_END_TIME is not null and FCPD.DAY_NUMBER is not null 

can we write the above query in précised form

1 Answer 1

0

Reference Link: Using IS NOT NULL for multiple columns

Try this,

SELECT FCPDD.AUDIENCE_ID,FCPD.APPLICATION_RULE_ID,FCPD.PROGRAMME_PART,FCPD.TARGET_DATE,FCPD.TIMEBAND_START_TIME,
FCPD.TIMEBAND_END_TIME,FCPD.DAY_NUMBER
FROM FPR_CHANNEL_PROCESS_DATA FCPD,FPR_CHANNEL_PROCESS_DATA_DTL FCPDD 
WHERE FCPD.CHANNEL_PROCESS_DATA_ID=FCPDD.CHANNEL_PROCESS_DATA_ID AND 
NOT(FCPD.TARGET_DATE IS NULL 
OR FCPDD.AUDIENCE_ID IS NULL 
OR FCPD.APPLICATION_RULE_ID IS NULL 
OR FCPD.PROGRAMME_PART IS NULL 
OR FCPD.TIMEBAND_START_TIME IS NULL
OR FCPD.TIMEBAND_END_TIME IS NULL 
OR FCPD.DAY_NUMBER IS NULL )

Try this:

SELECT FCPDD.AUDIENCE_ID,FCPD.APPLICATION_RULE_ID,FCPD.PROGRAMME_PART,FCPD.TARGET_DATE,FCPD.TIMEBAND_START_TIME,
FCPD.TIMEBAND_END_TIME,FCPD.DAY_NUMBER
FROM FPR_CHANNEL_PROCESS_DATA FCPD,FPR_CHANNEL_PROCESS_DATA_DTL FCPDD 
WHERE (FCPD.CHANNEL_PROCESS_DATA_ID=FCPDD.CHANNEL_PROCESS_DATA_ID AND 
NOT(FCPD.TARGET_DATE IS NULL 
OR FCPDD.AUDIENCE_ID IS NULL 
OR FCPD.APPLICATION_RULE_ID IS NULL 
OR FCPD.PROGRAMME_PART IS NULL 
OR FCPD.TIMEBAND_START_TIME IS NULL
OR FCPD.TIMEBAND_END_TIME IS NULL 
OR FCPD.DAY_NUMBER IS NULL ))
Sign up to request clarification or add additional context in comments.

2 Comments

Error as below:ORA-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis" *Cause: *Action: Error at Line: 9 Column: 22
remove is not null at end as added in where clause after and condition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.