on 01-19-2016 7:12 PM
Hello! I have some questions about SQL Command Editor (oracle 11g/12c - nw701.12).
1) Why is this command with parse error (F7), but runs fine (F8)?
select distinct USER_ADDR.BNAME, USER_ADDR.NAME_TEXTC from USER_ADDR, USR02, PA0105 where USR02.MANDT = '123' and USR02.GLTGB = '00000000' and USR02.USTYP = 'A' and USR02.UFLAG = '0' and USR02.BNAME = PA0105.USRID and USER_ADDR.BNAME = USR02.BNAME and USR02.BNAME in (select PA0105.USRID from PA0105, PA0000 where PA0105.SUBTY = '0007' and PA0105.MANDT = '123' and PA0000.MASSN = '09' and to_number(PA0000.BEGDA) < to_number(to_char(ADD_MONTHS(SYSDATE, -1), 'YYYYMMDD')) and PA0000.ENDDA = '99991231' and PA0000.MANDT = '123' and PA0105.PERNR = PA0000.PERNR) and USR02.BNAME not in ('XYZ') and USR02.BNAME not in ('ABC') order by USER_ADDR.BNAME
2) Why is this command with parse error (F7), but runs fine (F8)?
select distinct PA0105.USRID, PA0105.PERNR from PA0105, (select PA0105.USRID from PA0105 where PA0105.SUBTY = '0007' and PA0105.MANDT = '123' group by PA0105.USRID having count(distinct PA0105.PERNR) > '1') A where A.USRID = PA0105.USRID
minus
select PA0105.USRID, PA0105.PERNR from PA0105, PA0000, (select PA0105.USRID from PA0105, PA0000 where PA0105.SUBTY = '0007' and PA0105.MANDT = '123' and PA0000.MANDT = '123' and PA0105.PERNR = PA0000.PERNR group by PA0105.USRID having count(distinct PA0000.PERNR) > '1') A where PA0000.MASSN = '09' and to_number(PA0000.BEGDA) < to_number(to_char(SYSDATE, 'YYYYMMDD')) and PA0000.ENDDA = '99991231' and A.USRID = PA0105.USRID and PA0105.PERNR = PA0000.PERNR order by USRID, PERNR
3) Sometimes I try to combine (set operations) three commands that work, but results in an error (ERROR_IN_SET_OPERATOR).
Hi Roberto,
Which "sql command editor" tool you are using?
What is the result from sqlplus?
Best regards,
James
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.