본문 바로가기

DataBase112

[해결 방법] ORA-00976 ORA-00976: Specified pseudocolumn or operator not allowed here Environment Language: Oracle Problem SELECT LEVEL-1 HOURS , NVL(COUNT(TO_CHAR(DATETIME, 'FMHH24')), 0) COUNT FROM DUAL RIGHT JOIN ANIMAL_OUTS ON (LEVEL-1) = TO_CHAR(DATETIME, 'FMHH24') CONNECT BY LEVEL 2023. 12. 25.
[해결 방법] Incompatible/nonstandard server version or connection protocol detached 🐬 기본 환경 - IDE: MySQL Workbench - DataBase: MariaDB 🖨️경고 1 2 3 4 5 6 7 8 9 Connection Warning(rds-mini1) incompatible/nonstandardd server version or connection protocol detected(10.6.14) A connection to this database can be established but some MySQL Workbench features may not work properly since the database is not fully compatble with the supported versions of MySQL. MySQL Workbench is develope.. 2023. 10. 10.
[해결 방법] ORA-00937: not a single-group group function 👉 기본 환경 - Language: Oracle ⌨️ 코드 1 2 3 4 5 6 7 8 9 10 11 WITH SUB AS ( SELECT TO_CHAR(DATETIME, 'FMHH24') AS HOUR FROM ANIMAL_OUTS GROUP BY TO_CHAR(DATETIME, 'FMHH24') ) SELECT HOUR, COUNT(*) AS COUNT FROM SUB WHERE HOUR BETWEEN 9 AND 19 ORDER BY TO_NUMBER(HOUR) ; 🖨️오류 ORA-00937: not a single-group group function 📡 원인 GROUP BY 절과 SELECT 절 사이에서 집계 함수가 필요한데, 그룹화되지 않은 열에 대해 집계 함수를 사용하지 않음 📰 해결 방법 1.. 2023. 9. 28.
[해결 방법] ORA-01821: date format not recognized 👉 기본 환경 - Language: Oracle ⌨️ 코드 1 2 3 4 5 6 SELECT TO_CHAR(DATETIME, 'h24') HOUR, COUNT(*) COUNT FROM ANIMAL_OUTS GROUP BY TO_CHAR(DATETIME, 'h24') ORDER BY HOUR ; 🖨️오류 ORA-01821: date format not recognized 📡 원인 TO_CHAR() DATE FROMAT에 'h24' 타입이 없음 📰 해결 방법 1 2 3 4 5 6 SELECT TO_CHAR(DATETIME, 'hh24') HOUR, COUNT(*) COUNT FROM ANIMAL_OUTS GROUP BY TO_CHAR(DATETIME, 'hh24') ORDER BY HOUR ; TO_CHAR.. 2023. 9. 17.
[해결 방법] ORA-00932: inconsistent datatypes: expected DATE got NUMBER 👉 기본 환경 - Language: Oracle ⌨️ 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 SELECT B.TITLE, B.BOARD_ID, R.REPLY_ID, R.WRITER_ID, R.CONTENTS, TO_CHAR(R.CREATED_DATE, 'YYYY-MM-DD') CREATED_DATE FROM USED_GOODS_BOARD B JOIN USED_GOODS_REPLY R ON B.BOARD_ID = R.BOARD_ID WHERE B.CREATED_DATE = 2022-10 ORDER BY R.CREATED_DATE, B.TITLE ; 🖨️오류 ORA-00932: inconsistent datatypes: expected DATE got NUMBER 📡 원인 DATE 데이터.. 2023. 9. 17.
[해결 방법] ORA-01861: literal does not match format string 👉 기본 환경 - Language: Oracle ⌨️ 코드 1 2 3 4 5 6 7 8 9 10 11 12 13 14 SELECT B.TITLE, B.BOARD_ID, R.REPLY_ID, R.WRITER_ID, R.CONTENTS, TO_CHAR(R.CREATED_DATE, 'YYYY-MM-DD') CREATED_DATE FROM USED_GOODS_BOARD B JOIN USED_GOODS_REPLY R ON B.BOARD_ID = R.BOARD_ID WHERE B.CREATED_DATE >= '2022-10-01' AND B.CREATED_DATE = DATE '2022-10-01' AND B.CREATED_DATE = DATE '2022-10' ORDER BY R.CREATED_DATE, B.TI.. 2023. 9. 17.