Deutsches Application Express Forum (ApEx) -- Installation , Engine / SQL , Anwendungen
HTMLDB Engine :  Oracle Apex The fastest message board... ever.
Alles in HTMLDB, Applikationen, Berichte, SQL ... 
Re: Datums Lov
geschrieben von: christian_goto (---.dip0.t-ipconnect.de)
Datum:

hier mal meine view für 37 monate ,kannste dir ja anpassen ;)


CREATE OR REPLACE VIEW V_MONATE_RUECK AS
SELECT M AS M_RUECK
,INITCAP(TO_CHAR(ADD_MONTHS(SYSDATE,-M),'MON/YYYY')) AS MON
,INITCAP(TO_CHAR(ADD_MONTHS(SYSDATE,-M),'MON.YYYY')) AS MON_POINT
,INITCAP(TO_CHAR(ADD_MONTHS(SYSDATE,-M),'YYYYMM')) AS MON_JOB
,INITCAP(TRIM(TO_CHAR(ADD_MONTHS(SYSDATE,-M),'MONTH')))||TO_CHAR(ADD_MONTHS(SYSDATE,-M),'/YYYY') AS MONAT
,TO_CHAR(ADD_MONTHS(SYSDATE,-M),'MM/YY') AS MMYY
,TO_CHAR(ADD_MONTHS(SYSDATE,-M),'MM/YYYY') AS MMYYYY,
TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,-M-1))+1) AS ERSTER_TAG
, TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,-M))) AS LETZTER_TAG
FROM (
SELECT 0 AS M FROM DUAL
UNION SELECT 1 AS M FROM DUAL
UNION SELECT 2 AS M FROM DUAL
UNION SELECT 3 AS M FROM DUAL
UNION SELECT 4 AS M FROM DUAL
UNION SELECT 5 AS M FROM DUAL
UNION SELECT 6 AS M FROM DUAL
UNION SELECT 7 AS M FROM DUAL
UNION SELECT 8 AS M FROM DUAL
UNION SELECT 9 AS M FROM DUAL
UNION SELECT 10 AS M FROM DUAL
UNION SELECT 11 AS M FROM DUAL
UNION SELECT 12 AS M FROM DUAL
UNION SELECT 13 AS M FROM DUAL
UNION SELECT 14 AS M FROM DUAL
UNION SELECT 15 AS M FROM DUAL
UNION SELECT 16 AS M FROM DUAL
UNION SELECT 17 AS M FROM DUAL
UNION SELECT 18 AS M FROM DUAL
UNION SELECT 19 AS M FROM DUAL
UNION SELECT 20 AS M FROM DUAL
UNION SELECT 21 AS M FROM DUAL
UNION SELECT 22 AS M FROM DUAL
UNION SELECT 23 AS M FROM DUAL
UNION SELECT 24 AS M FROM DUAL
UNION SELECT 25 AS M FROM DUAL
UNION SELECT 26 AS M FROM DUAL
UNION SELECT 27 AS M FROM DUAL
UNION SELECT 28 AS M FROM DUAL
UNION SELECT 29 AS M FROM DUAL
UNION SELECT 30 AS M FROM DUAL
UNION SELECT 31 AS M FROM DUAL
UNION SELECT 32 AS M FROM DUAL
UNION SELECT 33 AS M FROM DUAL
UNION SELECT 34 AS M FROM DUAL
UNION SELECT 35 AS M FROM DUAL
UNION SELECT 36 AS M FROM DUAL
);



Thema Neugierige geschrieben von geschrieben
Datums Lov 2305 lilla
Re: Datums Lov 979 christian_goto
Re: Datums Lov 1017 elrey
Re: Datums Lov 962 lilla
Re: Datums Lov 1702 christian_goto


In diesem Forum dürfen nur registrierte Benutzer schreiben.
This forum powered by Phorum.