Month last/Previuous
Dear all,
I want back the last 36 months of sysdate (in the current month) as below.
Jun - 14
-14 may
Apr - 14
.
.
.
up to 36 months.
Kindly inviting you to suggest the way to build Sql.
Kind regards
Amit
Do you want this:
SELECT to_char (add_months(sysdate,-LEVEL), 'Mon-YY') result OF double
connect BY LEVEL<=>=>
Tags: Database
Similar Questions
-
I WANT TO DISPLAY THE MONTH LAST 15 EME?
I NEED GENERIC SQL QUERY
WHO TAKES SYSDATE AS PUT
IT DISPLAY MONTH LAST 15 EME DAY?
I HAVE TRIED BUT DID NOT SUCCEED.
U PLEASE COULD NOT ANSWER.You can try this
Select trunc (trunc(sysdate,'MM')-1, 'MM') + 14 double
/ -
Help: Last month last day until 12:00
Hello people,
I'm trying to get the last months last day in the query for a report. I tried the code below
but he returnedTRUNC (SYSDATE, 'MONTH') - 1
but I need to get the data until 12:00. Can someone please shed some light on this. Thank you11/30/2009 12:00:00 AM
Hello
Since it is currently some time in December 2009.
TRUNC (SYSDATE, 'MONTH') - 1
Returns 30 November 2009 00:00:00 (i.e. midnight or midnight).
If you want really 12 PMor noon, just soustraire.5 days from the beginning of the month:TRUNC (SYSDATE, 'MONTH') - .5
It will be on November 30, 2009 12:00.
If you use this in conditions, such as:
WHERE entry_date BETWEEN start_date AND TRUNC (SYSDATE, 'MONTH') - 1
where the goal is to get data only up to the end of last month, then you won't be midnight (00:00:00) or 12:00 (12:00:00); you want the last point in the day, 23:59:59 (23:59 min 59 s)
You can get that by saying:WHERE entry_date BETWEEN start_date AND TRUNC (SYSDATE, 'MONTH') - (1 / (24 * 60 * 60))
but I find it easier and clearer to say:
WHERE entry_date >= start_date AND entry_date < TRUNC (SYSDATE, 'MONTH') -- NOTE: strictly <, not =
-
The shot to the top of Thunderbird, this morning, the last 12 months of emails have disappeared from my Inbox. Older emails are still there. The new mails are still on my phone. Other accounts in Thunderbird (hotmail, gmail, etc.) do not seem to have been affected. This seems to be a special relationship between Thunderbird and BT internet email. I would be really grateful for any help. Thank you.
Hi - Thanks for taking the time to answer for me. No, the problems don't moved earlier. My wife also has a near-dormant BTinternet account which is accessible from the Thunderbird even on the same computer. Which has proved to work very well. I found that there were many problems with the BT e-mail yesterday and my problem was resolved later (2 hours on the phone) by a very helpful Lady in BT who virtually rebuilt my account. Even my security questions were rejected. I think that BT Yahoo email had major problems yesterday and he had nothing to do with Firefox - so please accept my apologies if I've wasted your time. Again thank you and best regards.
-
I have a complete picture of 12 months subscription given by Canon, but Adobe CC guard resetting my account for free from the trial subscription. I've updated Photoshop CC 2014 last month to find he wasn't an update at all but a trial version of 2015, which seems to have deleted 2014 my system, so I do not have Photoshop at all now. Adobe support is a continuous loop of questions meaningless and I find myself at a forum instead of a human being who could address this issue. In the average time that I tell my clients that are waiting for images? My subscription runs out in October, and now I see little incentive to renew because I don't get what has already been paid. If someone from Adobe would like to contact me that would be a start.
Please try the steps listed in https://helpx.adobe.com/manage-account-membership/cc-reverts-to-trial.html
I hope this helps.
-
Missing the month last s TimeMachine backup
last night, I noticed something TimeMachine called "cleaning of older backups. About half an hour later, I noticed the TimeMachine PrefPane and Finder now show also significantly more available space on the destination volume, which also confirms that the data is lost!
You offer too little information for me to be useful, but perhaps the end Pondini can help... Learn more about Time Machine http://pondini.org/TM/Home.html
-
Didn't find any solution for the problem... upgrade vista to W7 ATU ATU stops at 72% and only put back the image of Vista may get the computer working again.
What I have done:
1. update of the old programs to W7 compatible.
2. install the latest drivers SATA (compatible W7)
3. install the latest audio drivers (compatible W7)
3. uninstalled my antivirus software
4 uninstalled RealCNC premium
5 left the command line sfc/scannow to check and repair corrupt files
6 disabled all Iltimate options
7 updated my BIOS (Gigabyte - to a (compatible W7)
8. no installed PowerDVD 8
9 uninstalled Radiotracker
10 uninstalled Acronis Home 11
11 ran the configuration with all disconnected USB devices
12 removed two chips of RAM (from 4 to 2 GB of RAM)
13 Ran MSCONFIG hidden in all Microsoft services services and all the other disabled
14. off in MSCONFIG also all startup itemsBetween each element of cummulating, I ran the installation of W7. Even after the last of them, I always get the 72% jump.
The blue screen says the same thing every time:
BAD_POOL_HEADER
Stop: 0 x 00000019Instead of update, I tried a clean install and held without any problem. But because of so many applications installed with many specific configurations, I need the upgrade option.
My system:
A Core2Duo, Gigabyte motherboard, 4 GB of RAM, two hard drives, about 200 senior applications and lower installed. The system is connected to a UPS APC"Smart-UPS 1500.Any ideas that can help me get the upgrade?
Windows Update has nothing to do with the upgrade of Windows. Please post future questions about the upgrade in this forum: http://social.answers.microsoft.com/Forums/en-US/w7install/threads
0 X 00000019: BAD_POOL_HEADER
A pool header problem is a problem with the allocation of memory for Windows. Device driver problems are probably the most common, but it can have various causes, including defective or other writing problems disc and problems with some routers... [Source: http://aumha.org/a/stop.htm]See also: http://msdn.microsoft.com/en-gb/library/ms793223.aspx ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft
-
Help
Welcome to the HP Support Forums, I hope you enjoy your experience! To help you get the most out of the Forums of HP, I would like to draw your attention to the Guide of the Forums HP first time here? Learn how to publish and more.
I saw your post about some kind of problem with the ATA/ATAPi IDE controller drivers. There is no specific drivers listed on the page of the driver for your model. Here is a third-party link that will show you how to upgrade your drivers from the Device Manager.
-
HP 630 overheating, crash Windows 7 of the month last 64, low speed fan
Hello
HP 630, new bios, old laptop a day!
Windows 7 64 ult, drivers latest
After the computer crash laptop several minutes. Several second before closing screen frozen and their speed will maximally.
When the fan working speed is very slow.
But when I restart the laptop in safe mod, fan speed is normal and mobile working normally! So, want to have in windows. I try many installation in the config of the power.
In the bios is several 090 newspapers...
CPU and other time around 40 - 45 c.
Photo after a reboot: http://www.ripoffreport.com/Owner_29abdd1c-1476-4ba8-a792-dfa516d96fdd/Item_2c7f61ed-dcd4-4e05-be36-...
What's wrong???
SOLVED!
After 30 days of waiting for parts laptop is now working.
Motherboard is the default. We also have to reinstall os.
-
Download & Download problems Windows 7 of the month last 32 bit
When trying to install CarMD disc get "a referral was returned by server.
When I tried to down load a site, it will not download the CarMD site.
Also when I try to download an attachment in an e-mail message, the same thing happens.
It ask if I want to save, I say Yes and nothing happening Iget a screen that says try again or cancel.
To save an attachment, you must use "save under" then both the name of the file and set sound, generally, Documents location
If the download from the internet you must use Save, does not, it open the file download and double click the Setup file so he can install
CarMD site, likely this http://www.carmd.com/?
-
I use Photoshop CS4 on and off for the preparation of the image.
recently I tried to use the clone tool and noticed he attached to a square 20 x 20 pixels of the image and move it.
I've updated all my hardware HP and Logitech drivers, ran the patch from Adobe for photoshop CS4, but it's still the wrong thing.
Other tools seem to work very well.
In the Panel of Source of duplication , Clipped to check and see if it's better.
-
PS Script to obtain performance data for 6 months last VM
Hi all
Its time for me to Rightsize the virtual machines before business continues in vSphere 5.0... We all know... vRAM
If I want to import virtual machines from a CSV file and run through the past 6 mth performance data (use CPU Avg and Avg Mem) and remove in a CSV file or htm... Here is what I use, but never to see the output to the top. I mess up something in the region of ForEach. Help, please!
*********************************
$filelocation = "C:\VMStatsReport.htm".
$ErrorActionPreference = "SilentlyContinue".
$import = import-Csv "C:\listofvms.csv".{ForEach ($vm in $import)
$Interval = "180".
$IntervalFinish = get-Date
$IntervalStart = $IntervalFinish.addDays (-1 * $Interval)$CPUAvg = $vm | Get-Stat - Stat Cpu.Used.Summation - start $IntervalStart - finishing $IntervalFinish
$MemAvg = $vm | Get-Stat - Stat Mem.granted.average - start $IntervalStart - finishing $IntervalFinish$report = @)
$vms = "" | Select-Object VMName "CPU Count", SixMonthCPUAvg, TotalMemory, SixMonthMemAvg
$vms. VMName = $vm. Name
$vms. "" CPU Count "= $vm.summary.config.numcpu
$vms. SixMonthCPUAvg = [String] ([Math]: round ((($CPUAvg |))) Measure-object-propriete value - average). Average), 1))
$vms. TotalMemory = $vm.summary.config.memorysizemb
$vms. SixMonthMemAvg = [String] ([Math]: round ((($MemAvg |))) Measure-object-propriete value - average). Average), 1))
$report += $vms
}$report | ConvertTo-Html-title "Report VMs" - body "report VMs < H2 > < / H2 > ' | Out-file $filelocation
**************************************************
Thank you
VMSavvy
There are some other problems with the script.
You had the name (a string) of the guest in the $vm variable. The cmdlet Get-Stat does not object to the setting of entity name.
The solution is to use the object returned by Get - VM.
I assumed that your CSV file looks like this
'Name '.
"vm1.
"vm2.
The metric cpu.used.summation is available only when the interval is set to level 3.
So, unless you have history 4 interval set at level 3, use another more common measure for the use of the processor. For example, cpu.usage.average.
$filelocation= "C:\VMStatsReport.htm" $ErrorActionPreference = "SilentlyContinue" $import = Import-Csv "C:\listofvms.csv" -UseCulture | %{Get-VM -Name $_.Name} $report = @() foreach ($vm in $import) { $Interval = "180" $IntervalFinish = Get-Date $IntervalStart = $IntervalFinish.addDays(-1 * $Interval) $CPUAvg = $vm | Get-Stat -Stat Cpu.Usage.Average -Start $IntervalStart -Finish $IntervalFinish $MemAvg = $vm | Get-Stat -Stat Mem.granted.average -Start $IntervalStart -Finish $IntervalFinish $vms = "" | Select-Object VMName, "CPU Count", SixMonthCPUAvg, TotalMemory, SixMonthMemAvg $vms.VMName = $vm.Name $vms."CPU Count" = $vm.summary.config.numcpu $vms.SixMonthCPUAvg = [String]([Math]::Round((($CPUAvg | Measure-Object -Property Value -Average).Average),1)) $vms.TotalMemory = $vm.summary.config.memorysizemb $vms.SixMonthMemAvg = [String]([Math]::Round((($MemAvg | Measure-Object -Property Value -Average).Average),1)) $report += $vms} $report | ConvertTo-Html -title "VMs Report" -body "
VMs Report
" | Out-File $filelocation -
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 complete the data for months current quarter of the last month of the previous quarter
- Here is the create table and insert the statement how my data is asCREATE TABLE SAMPLEDATA (Snapshot_M DATE, Date_Ky DATE, F_Quantities INTEGER)INSERT INTO VALUES SAMPLEDATA (SEPTEMBER 1, 2014 ", 1 SEPTEMBER 2014", 14)INSERT INTO VALUES SAMPLEDATA (OCTOBER 1, 2014 ", 1 OCTOBER 2014", 13)INSERT INTO VALUES SAMPLEDATA (1 NOVEMBER 2014", 1 NOVEMBER 2013', 12)INSERT INTO VALUES SAMPLEDATA (DECEMBER 1, 2014", 1 DECEMBER 2013', 11)INSERT INTO VALUES SAMPLEDATA (JANUARY 1, 2014 ", 1 JANUARY 2014", 10)INSERT INTO VALUES SAMPLEDATA (FEBRUARY 1, 2014 ", 1 FEBRUARY 2014", 90)INSERT INTO VALUES SAMPLEDATA (MARCH 1, 2014 ", 1 MARCH 2014", 20)INSERT INTO VALUES SAMPLEDATA (APRIL 1, 2014 ", 1 APRIL 2014", 23)INSERT INTO VALUES SAMPLEDATA (MAY 1, 2014", 1 MAY 2014', 30)INSERT INTO VALUES SAMPLEDATA (JUNE 1, 2014 ", 1 JUNE 2014", 70)INSERT INTO VALUES SAMPLEDATA (JULY 1, 2014 ", 1 JULY 2014", 20)Desired results set:Snapshot_M Date_Ky F_Quantities10 1/1/2014-2/1/201410 1/1/2014-3/1/201401/01/2014 41 10/20144/1/2014 5/1/2014 234/1/2014 6/1/2014 234/1/2014 7/1/2014 23My requirement is to load the data in the cube.So to summarize, data that are loaded onto the month last only a quarter Q1 tax (Jan) should server as a data for the quarter Q2 next month (February, March, April), the data loaded on the last month of Q2 (Apr) will be server as forecast data for Q3 months and so on.Thank you in advance.
with
SAMPLEDATA as
(select to_date('09/1/2014','mm/dd/yyyy') snapshot_m, to_date('09/01/2014','mm/dd/yyyy') date_ky, 14 f_quantities of all the double union)
Select to_date (October 1, 2014 "," mm/dd/yyyy ""), to_date (1 October 2014 "," mm/dd/yyyy"), 13 union double all the
Select to_date (November 1, 2013 "," mm/dd/yyyy ""), to_date (1 November 2013 "," mm/dd/yyyy"), 12 union double all the
Select to_date (December 1, 2013 "," mm/dd/yyyy ""), to_date (1 December 2013 "," mm/dd/yyyy"), 11 union double all the
Select to_date (January 1, 2014 "," mm/dd/yyyy ""), to_date (1 January 2014 "," mm/dd/yyyy"), 10 of all the double union
Select to_date (February 1, 2014 "," mm/dd/yyyy ""), to_date (1st February 2014 "," mm/dd/yyyy"), 90 union double all the
Select to_date (March 1, 2014 "," mm/dd/yyyy ""), to_date (1 March 2014 "," mm/dd/yyyy"), 20 union double all the
Select to_date (April 1, 2014 "," mm/dd/yyyy ""), to_date (1 April 2014 "," mm/dd/yyyy"), 23 union double all the
Select to_date (May 1, 2014 "," mm/dd/yyyy ""), to_date (1 may 2014 "," mm/dd/yyyy"), 30 union double all the
Select to_date (June 1, 2014 "," mm/dd/yyyy ""), to_date (1 June 2014 "," mm/dd/yyyy"), 70 union double all the
Select to_date (July 1, 2014 "," mm/dd/yyyy ""), to_date (1 July 2014 "," mm/dd/yyyy"), 20 union double all the
Select to_date (August 1, 2014 "," mm/dd/yyyy ""), to_date (1 August 2014 "," mm/dd/yyyy"), 22 of the double
)
Select snapshot_m, date_ky, last_value (f_quantities) ignore nulls on f_quantities (order by date_ky)
of (trunc (add_months (snapshot_m-1), 'q') select snapshot_m, date_ky,)
-case when trunc (add_months (snapshot_m-1), 'q')! = lag (trunc (add_months(snapshot_m,-1), 'q')) (date_ky order)
then lag (f_quantities) (date_ky order)
end f_quantities
of sampledata
where date_ky > = date ' 2014-01-01'
)
where snapshot_m > = date ' 2014-01-01'
order of date_ky
SNAPSHOT_M DATE_KY F_QUANTITIES 01/01/2014 01/02/2014 10 01/01/2014 01/03/2014 10 01/01/2014 01/04/2014 10 01/04/2014 01/05/2014 23 01/04/2014 01/06/2014 23 01/04/2014 01/07/2014 23 01/07/2014 01/08/2014 20 01/07/2014 01/09/2014 20 01/07/2014 01/10/2014 20 Concerning
Etbin
-
Help! I'm on a limited data plan (20 GB/month) and had $50 in excess charges the month last because of the iCloud backup my iPhone and my iPad from one day to the next. This consumed approximately 15 GB backup overnight. Is it possible to program these backups, so I'm not on my data allowance? And what is the average amount of data usage when the cloud goes back a device? This amount seems extreme to me. Please help if you can, thanks!
Hello
I ask you to contact you please contact customer service
Maybe you are looking for
-
Sound does not work on the Internet only
My sound stopped working with multiple browsers (Safari, Firefox and through Parallels Internet Explorer on Windows 10). No difference if Parallels isn't running. Alerts and iTunes are great! I can play jpeg via Adobe Photoshop organizing. Everything
-
Is there a way to know which character I without delving into all the Personas?
I want to change my character, but the same one use in the future. Is it possible that I can find it without having to search the entire page of Personas?
-
Qosmio G20-127: after that Windows update I can not see list fax and printer
Description of the problemModel: Toshiba Qosmio G20-127Operating Sysytem: Microsoft Windows Media Center Edition After the restoration of BONE of restore DVD, I can see list Fax and printer. But after the Windows Update I can not see the list of fax
-
Replace the power supply for a Pavilion a140n
How to install a new power supply in a HP Pavilion a140n? Is there a step by step guide?
-
Integrated with HP Pavilion dv9715nr notebook PC webcam problem
Hello everyone, I hope someone can help point me in the direction of a fix of webcam for the problem that my laptop has developed. I spent the last few days browsing the internet looking for a solution to what seems to be a widespread problem, but wi