Get the date of each month in the last year
Hi all
I need to find the last date of the month for the year.
Example:
I used to spend the date or such year 2012 or 01-01-2012(DD-MM-YYYY)
SQL query should return the last date of the month as
31/01/2012
28/02/2012
31/03/2012
30/04/2012
.
.
.
.
.
12/31/2012
For more top the requirement that I wrote the SQL code following
select rownum as row_count, case when rownum=1 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as Jan_month, case when rownum=2 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as Feb_month, case when rownum=3 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as mar_month, case when rownum=4 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as apr_month, case when rownum=5 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as may_month, case when rownum=6 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as jun_month, case when rownum=7 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as jul_month, case when rownum=8 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as aug_month, case when rownum=9 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as sep_month, case when rownum=10 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as oct_month, case when rownum=11 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as nov_month, case when rownum=12 then last_day(to_date(add_months(trunc(to_date('01-01-2012','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end as dec_month from dual connect by level <= 12 order by rownum;
Result
Jan_Month | Feb_Month | Mar_Month | Apr_Month | may_month | jun_month | jul_month | aug_month | sep_month | oct_month | nov_month | dec_month | |
1 | 31/01/2014 | |||||||||||
2 | 28/02/2014 | |||||||||||
3 | 31/03/2014 | |||||||||||
4 | 30/04/2014 | |||||||||||
5 | 31/05/2014 | |||||||||||
6 | 30/06/2014 | |||||||||||
7 | 31/07/2014 | |||||||||||
8 | 31/08/2014 | |||||||||||
9 | 30/09/2014 | |||||||||||
10 | 31/10/2014 | |||||||||||
11 | 30/11/2014 | |||||||||||
12 | 12/31/2012 |
Except the result:
am result except as single line such as
Jan_Month | Feb_Month | Mar_Month | Apr_Month | may_month | jun_month | jul_month | aug_month | sep_month | oct_month | nov_month | dec_month |
31/01/2012 | 28/02/2012 | 31/03/2012 | 30/04/2012 | 31/05/2012 | 30/06/2012 | 31/07/2012 | 31/08/2012 | 30/09/2012 | 10/31/2012 | 30/11/2012 | 12/31/2012 |
Kindly give me suggestion to archive more high result.
Thanks and greetings
Saami
I agree with Marcus Pivot is the way to go on this subject... But on the other hand you almost solved yourself... it was just a max function for your results:
---------
select max(case when rownum=1 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as Jan_month, max(case when rownum=2 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as Feb_month, max(case when rownum=3 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as mar_month, max(case when rownum=4 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as apr_month, max(case when rownum=5 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as may_month, max(case when rownum=6 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as jun_month, max(case when rownum=7 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as jul_month, max(case when rownum=8 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as aug_month, max(case when rownum=9 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as sep_month, max(case when rownum=10 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as oct_month, max(case when rownum=11 then last_day(to_date(add_months(trunc(to_date('01-01-2014','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as nov_month, max(case when rownum=12 then last_day(to_date(add_months(trunc(to_date('01-01-2012','DD-MM-YYYY'), 'YYYY'), level - 1), 'DD-MM-YY')) end) as dec_month from dual connect by level <= 12 order by rownum;
AND to avoid hard-coding, you can also modify your query in the form:
select max(case when rownum=1 then last_day(to_date(to_char(rownum),'MM')) end) as Jan_month, max(case when rownum=2 then last_day(to_date(to_char(rownum),'MM')) end) as Feb_month, max(case when rownum=3 then last_day(to_date(to_char(rownum),'MM')) end) as mar_month, max(case when rownum=4 then last_day(to_date(to_char(rownum),'MM')) end) as apr_month, max(case when rownum=5 then last_day(to_date(to_char(rownum),'MM')) end) as may_month, max(case when rownum=6 then last_day(to_date(to_char(rownum),'MM')) end) as jun_month, max(case when rownum=7 then last_day(to_date(to_char(rownum),'MM')) end) as jul_month, max(case when rownum=8 then last_day(to_date(to_char(rownum),'MM')) end) as aug_month, max(case when rownum=9 then last_day(to_date(to_char(rownum),'MM')) end) as sep_month, max(case when rownum=10 then last_day(to_date(to_char(rownum),'MM')) end) as oct_month, max(case when rownum=11 then last_day(to_date(to_char(rownum),'MM')) end) as nov_month, max(case when rownum=12 then last_day(to_date(to_char(rownum),'MM')) end) as dec_month from dual connect by level <= 12 order by rownum;
Easy way: (without login)
SELECT LAST_DAY (TO_DATE (ROWNUM, 'MM')) AS Jan_month, LAST_DAY (TO_DATE (ROWNUM + 1, 'MM')) AS Feb_month, LAST_DAY (TO_DATE (ROWNUM + 2, 'MM')) AS Mar_month, LAST_DAY (TO_DATE (ROWNUM + 3, 'MM')) AS Apr_month, LAST_DAY (TO_DATE (ROWNUM + 4, 'MM')) AS May_month, LAST_DAY (TO_DATE (ROWNUM + 5, 'MM')) AS Jun_month, LAST_DAY (TO_DATE (ROWNUM + 6, 'MM')) AS Jul_month, LAST_DAY (TO_DATE (ROWNUM + 7, 'MM')) AS Aug_month, LAST_DAY (TO_DATE (ROWNUM + 8, 'MM')) AS Sep_month, LAST_DAY (TO_DATE (ROWNUM + 9, 'MM')) AS Oct_month, LAST_DAY (TO_DATE (ROWNUM + 10, 'MM')) AS Nov_month, LAST_DAY (TO_DATE (ROWNUM + 11, 'MM')) AS Dec_month FROM DUAL
See you soon,.
Manik.
Tags: Database
Similar Questions
-
How to get the last date of 3 days for the current month?
Hello. Guy
How to get the last date of 3 days for the current month?
MY OUTPUT WOULD LOOK LIKE THIS
JANUARY 29, 2016
JANUARY 30, 2016
JANUARY 31, 2016
GUYS HELP ME / / /...
SQL > select last_day (sysdate) - level + 1 double connect by level<= 3="" order="" by="">=>
LAST_DAY)
---------
29 JANUARY 16
30 JANUARY 16
31 JANUARY 16
-
How to get the last business day of the previous month?
Hi all
We need the user as below,
If the user select 18 June 2015 ' quick dashboard as the input value, and then they want to see last month last day of work (business date: 29-may-2015) amount in report, if you have an idea please share with us.thanks
Note:
use under request we can able to get the last day of the previous month, we want to for the last business day of the last month, based on the date of entry of the user?
TIMESTAMPADD (SQL_TSI_DAY,-(1), TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ("DIM_TIME". ("" DataDate ") *-(1) + 1,"DIM_TIME ". (("" DataDate "))
Thank you
Deva
Try this,
case when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 1 then timestampadd (sql_tsi_day, (Dayofmonth(Date '2015-06-15') *-1)-2, Date '' 2015-06-15) when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 7 then timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1-1, Date '' 2015-06-15) another timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15') end
As Ftsiot said in this post, it will work only to exclude the sat and Sun. Another one if you want to exclude regional holiday, you may need a calendar in DB table.
Thank you
AJ
-
How to get the last day of the weekend rather than a month
Hi all
Is the request appropriate and preferable to use to get the last business day of the month below?
SELECT to_date('13.08.2014','dd.mm.yyyy') + MAX(RNUM) LastDay(nonweekend) FROM (SELECT ROWNUM RNUM FROM ALL_OBJECTS where rownum <=31) WHERE ROWNUM <= 31 ANd TO_CHAR(to_date('13.08.2014','dd.mm.yyyy') + RNUM, 'DY','NLS_DATE_LANGUAGE=ENGLISH' ) NOT IN ('SAT' , 'SUN') and to_date('13.08.2014','dd.mm.yyyy') + RNUM <= last_day(to_date('13.08.2014','dd.mm.yyyy'))
I have to use this motion for production.
East - recommended to use?
You can change your query this way:
WITH t AS (SELECT trunc (to_date ('& calc_date', 'dd.mm.yyyy'), 'mm') + level - 1 calc_date)
OF THE DOUBLE
CONNECT BY LEVEL<= last_day(to_date('&calc_date',="" 'dd.mm.yyyy'))="" -="" trunc(to_date('&calc_date',="" 'dd.mm.yyyy'),="" 'mm')="" +="">=>
)
Select max (calc_date)
t
where to_char (calc_date, 'DY', 'NLS_DATE_LANGUAGE = ENGLISH') NOT IN ("SAT", "Sun");
-
How to get the last day of a month for every 2 months for a given period?
Hello
Can is it some please let me know how to get the last day, last day of the week, the weekend last day, last Monday, one month for every 2 months for a given period?
Thanks in advance.
Try the below
SELECT LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))) lastday.
BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'SAT '.
SO LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-1
WHERE TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'Sun '.
THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))-2
Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))
END as lastweekday,
BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') IN ('Sam', 'SUN')
THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))
Of OTHER LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))
-(TO_NUMBER (TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))),' from)) - 1).
END as lastweekendday,
BOX WHEN TO_CHAR (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), 'DY') = 'MY
THEN LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2)))
Of OTHER NEXT_DAY (LAST_DAY (ADD_MONTHS (TRUNC(startdate,'MM'), ((LEVEL*2)-2))), "LUN")-7
END AS lastmonday
FROM (SELECT SYSDATE startdate,
SYSDATE + 300 enddate
THE DOUBLE)
CONNECT BY LEVEL<=>=>
-
Get the last disc based on the date
Version of database
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64 bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE Production 9.2.0.8.0
AMT for HP - UX: 9.2.0.8.0 - Production Version
NLSRTL Version 9.2.0.8.0 - Production
data and model table
CREATE TABLE EXAMPLE
(
UNIT_ID1 VARCHAR2 (15 BYTE) NOT NULL,
COLL_DATE1 DAY,
ATTRIB_CODE1 VARCHAR2 (4 BYTE) NOT NULL,
UNIT_ID2 VARCHAR2 (15 BYTE),
COLL_DATE2 DAY,
ATTRIB_CODE2 VARCHAR2 (4 BYTE),
DATE OF AUDIT_INSERT_DATS NOT NULL
)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008646', TO_DATE (OCTOBER 8, 2012 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), 'DP', 'W039712008646', TO_DATE (OCTOBER 8, 2012 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'),)
'PP', TO_DATE (OCTOBER 9, 2012 11:10:56 "," MM/DD/YYYY HH24:MI:SS'));)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008646', TO_DATE (OCTOBER 8, 2012 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 'DP', NULL, NULL,)
'DP', TO_DATE (OCTOBER 9, 2012 11:11:02 "," MM/DD/YYYY HH24:MI:SS'));)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008647', TO_DATE (OCTOBER 8, 2012 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 'DP', NULL, NULL,)
'DP', TO_DATE (OCTOBER 9, 2012 11:15:18 ',' DD/MM/YYYY HH24:MI:SS'));)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008649', TO_DATE (OCTOBER 8, 2012 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 'TP', NULL, NULL,)
'TP', TO_DATE (OCTOBER 9, 2012 11:15:39 ',' DD/MM/YYYY HH24:MI:SS'));)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008650', TO_DATE (OCTOBER 8, 2012 00:00:00 "," MM/DD/YYYY HH24:MI:SS'), 'RD', NULL, NULL,)
'RD', TO_DATE (OCTOBER 9, 2012 11:16:10 ',' DD/MM/YYYY HH24:MI:SS'));)
Insert into SAMPLE
(UNIT_ID1, COLL_DATE1, ATTRIB_CODE1, UNIT_ID2, COLL_DATE2,
ATTRIB_CODE2, AUDIT_INSERT_DATS)
Values
('W039712008653', TO_DATE (OCTOBER 8, 2012 00:00:00 ',' DD/MM/YYYY HH24:MI:SS'), 'CX', NULL, NULL,)
'CX', TO_DATE (OCTOBER 9, 2012 11:17:23 ',' DD/MM/YYYY HH24:MI:SS'));)
COMMIT;
-----------------------
unit_id W039712008646 has two records. I need a query to get the last disk based on audit_insert_dats. Any help is appreciated.
I tried to use max (audit_insert_dats) but not able to get a recorduser_anumoses wrote:
unit_id W039712008646 has two records. I need a query to get the last disk based on audit_insert_dats.You can use the ROW_NUMBER() analytic function
SQL> select * 2 from 3 (select a.*, 4 row_number() over(partition by UNIT_ID1 order by AUDIT_INSERT_DATS desc) rn 5 from sample a) 6 where rn = 1; UNIT_ID1 COLL_DATE ATTR UNIT_ID2 COLL_DATE ATTR AUDIT_INS RN --------------- --------- ---- --------------- --------- ---- --------- ---------- W039712008646 08-OCT-12 DP DP 09-OCT-12 1 W039712008647 08-OCT-12 DP DP 09-OCT-12 1 W039712008649 08-OCT-12 TP TP 09-OCT-12 1 W039712008650 08-OCT-12 RD RD 09-OCT-12 1 W039712008653 08-OCT-12 CX CX 09-OCT-12 1
-
How to get the last DML statement in each block
Hello
How can I get the latest DML statements in each block.
As SYSTEM. LAST_QUERY returns the last select statement, I need to get the last Insert/Update/Delete statement
in each block.
Thanks in advance
RizlyRizly,
You can use the GET_BLOCK_PROPERTY to get the last query executed on this block.
MESSAGE(GET_BLOCK_PROPERTY('
', LAST_QUERY)); Kind regards
Manu.
If this answer is useful or appropriate, please mark. Thank you.
-
Hi friends,
I have the below query that returns me the data as below:
Select 'Label', to_number (to_char (to_date(start_date,'yyyy-mm-dd'), 'IW')) - to_number (to_char (add_months (sysdate,-6), 'IW')) + 1 as a weekly sum, (col1) val yyy_view
where to_date(start_dt,'yyyy-mm-dd') between trunc (add_months(sysdate,-6)) and trunc (sysdate)
Group of to_char (to_date(start_date,'yyyy-mm-dd'), 'IW')
order of to_char (to_date(start_date,'yyyy-mm-dd'), 'IW')
Label weekly val
1 20 data
2 24 data
3 20 data
4 28 data
5 20 data
6 24 data
and so on...
Now the requirement is to get the last date of the week for each week as below
Label weekly val
given 2011-08-30 20
given 2011-08-23 24
given 2011-08-16 20
given 28 2011-08-09
given 2011-08-02 20
the weekly column should have the date of the last week. In the example above Wednesday is supposed to be the last date of the week.
Kind regards
PradeepMissed the part "Wednesday is considered date of last week. The week is Thursday to Wednesday. If so:
select 'Label', trunc(min(start_dt)) as day2, sum(col1 ) val from yyy_view where start_dt between trunc(add_months(sysdate,-6)) and trunc(sysdate) group by trunc(start_date - 3,'IW') order by trunc(start_date - 3,'IW') /
SY.
-
I have been using Photoshop CS5 for some time for photos products (jewelry). What are my best options to get the last Photoshop.
Hi michaelb.
You can subscribe to Plan photography for $9.99 a month, which will give the latest version of Photoshop CC 2015, CC 2015 Lightroom and Adobe Bridge.
Lightroom and Photoshop | Plan of cloud of Adobe's creative photography
Kind regards
Mohit
-
How to get the last row and the sum of all columns in a query
Hello
is there a way to get the last record for a column and the sum of all the Archives to another column in the same query.
Best regards
You must set your needs correctly volunteers to help here...
Your data are not good enough to bring you a precise solution. Purpose, you do not have a column, which draws a distinction between the first and the last entry.
The solution becomes easy based on your design.
I introduced a grouping called 'id' column and a time column called 'time_of_insert' (only this way you can say with confidence that you can differentiate between the first and last (also a foolproof solution) - you can possibly use sequence (instead of date but if you say that you can insert two lines at the same time) ((and then likely sequence would be a better choice to differentiate instead of a timestamp field) etc...)
With your sample data, something like this can be done to get the desired results.
-----------------------------------------------------------------------------------------------------------------------
WITH dataset AS
(SELECT 1 id, 10 used, 8 remain, systimestamp + 1/24 time_of_insert FROM DUAL
UNION ALL
SELECT the 1 id, 1, 7, systimestamp + 2/24 FROM DUAL
UNION ALL
SELECT the id 1, 2, 5, systimestamp + 3/24 FROM DUAL
UNION ALL
SELECT 1 id, 1, 0, systimestamp + 4/24 FROM DUAL
UNION ALL
SELECT 1 id, 0, 0, systimestamp + 5/24 FROM DUAL
UNION ALL
SELECT the 1 id, 1, 4, systimestamp + 6/24 FROM DUAL)
SELECT *.
(SELECT SUM (used) ON sum_all)
FIRST_VALUE (stay)
COURSES (PARTITION BY id ORDER BY time_of_insert DESC)
last_row
Of THE dataset)
WHERE ROWNUM = 1;
Output:
------------------------
SUM_ALL LAST_ROW
------------------------------
15 4
See you soon,.
Manik.
-
Need to get the last value of the quarter
Hi expert,
I have data like this
Amount DATE column column
January $1 20
|
January 30, $50
Fed 60 1
|
February 28, $80
like that throughout the year
I will provide the first promt and selects the 1st quarter. Then, it will show you Jan, Feb, March in the Date column and the respective amounts in the amount column.
I need to put a formula into the amount column... So that I get the last day of the amonut of quarter.
Any help is appreciated.
Thank you
V
Published by: Vincent Krishna on May 25, 2011 06:43CASES WHERE 'Fiscal Date' = TIMESTAMPADD (SQL_TSI_DAY, TIMESTAMPADD (1), (SQL_TSI_QUARTER, 1, TIMESTAMPADD (SQL_TSI_DAY, DAY_OF_QUARTER (CURRENT_DATE) *-(1) CURRENT_DATE + 1))) THEN 'Fact - amount' END;
Apply the filter above on your amount column.
Thank you
-Laurence. -
How to get the last day of the week?
HII
I can get the week number of calendar for a given date using
SELECT to_char (to_date('04/04/2011','MM/DD/YYYY'), 'WW') FROM dual
can any body tell me, how to get the last day of the week?
and the answer should be: 04/08/2011(8th april)
Thank you
San
Published by: sandeep9 on April 4, 2011 03:50Perhaps this...
SQL> select trunc(sysdate,'WW')+6 from dual; TRUNC(SYSDATE,'WW')+ -------------------- 08-APR-2011 00:00:00 SQL>
-
How to get the last parameter of exprision regular
Hi all!
I need to extract the last date in the string.
Here my code
How can I get the last datePattern pattern = Pattern.compile("(19|20)\\d\\d([- \\\\/.](0[1-9]|1[012])[- \\\\/.](0[1-9]|[12][0-9]|3[01]))?"); Matcher matcher = pattern.matcher(text); while(matcher.find()) { System.out.println(matcher.group());
Example->
Hello all the date is 2010-12-12 the date is 2010-10-10
and I want to get-> 2010-10-10
Thank you!Just assign the value of the find to a variable declared outside the loop. The variable will hold the last game when you exit the loop.
Kaj
-
How to get the last day of the year
Hi all
Thanks in advance...
How do I get the last day of the year that I'm passing date at run time.
I can manage to get the first day of the year by
SELECT TRUNC(SYSDATE,'YEAR') AS FDAY_YEAR
of the double
Thanks in advance
Concerning
Sachin1* select ADD_MONTHS(trunc(sysdate,'yyyy'),12)-1 dd from dual SQL> / DD ----------- 31-DEC-2010
-
How to get the last message received in the Inbox?
Currently I am using the following code to the list of messages in the Inbox.
Folder[] folders = store.list(Folder.INBOX);Folder inbox = folders[0];Message[] msgs = inbox.getMessages();
But, how could I do the last message that was received in my inbox at the moment?
I have a lot of unread messages in my Inbox and I can even receive the same message from sender twice at the same time, but I need access to the last message you received.
Thank you
As I have a implements FolderListener, I need to get the last message of FolderEvent object. But, I tried to access the last Inbox message, which will not always be there!
Thanks Deepesh
-
tried to get the last update. Update froze at 2%. Help
Tried to get the last update. It froze at 2%. Any help much appreciated.
Hello
Go close before the creative Cloud Desktop Application and also all related processes for the same if it's windows, the Manager of tasks and activity monitor if it's the Mac.
Very close to the AAMUpdater, Core Sync and IPCBroke process.
So go ahead and uninstall the Cloud Desktop creative Application from the link below.
Using creative cloud | Uninstall the creative cloud desktop application
and install the above from the link below.
https://creative.Adobe.com/products/creative-cloud
Concerning
Maansee
Maybe you are looking for
-
No Firefox menu button on rooted android 7 "kindle fire 2 running jellybean
There is no button menu at the top right and no physical menu button on tablet. also, no Firefox option in settings of the Tablet, what happens?
-
I'm just trying to remove every night of my computer. I deleted firefox 10 already. I'm going down to firefox 4, but before I do, I want every night of my computer and it is not listed in the Installer package synaptic or any other. There's a reason
-
Factory default software start startup Satellite L650 / 07C first time
Hello Today, I bought a new laptop Toshiba Satellite L650 / 07C.When I start the laptop first, he went to the recovery of factory default software?There is nothing on it is mentioned in the manual.Is this normal? is that mean that my laptop is not a
-
I disabled an app I would like to restore but can't find in my App list-how can I find to restore? He is the one that came with the upgrade of the CSI initially.
-
Why can I I not scan a picture to my computer when I'm out of ink in one of my cartridges? I don't want to print only scan to my computer and the error message allow me to analyze.