- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- select week and year 1 year in the past
Operating System - HP-UX
1754393
Members
2871
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2005 10:29 PM
тАО01-27-2005 10:29 PM
Re: select week and year 1 year in the past
31-03-2004 is week 14 and Q1
01-04-2004 is week 14 but Q2
Week 14 have some days in Q1 and some others in Q2. So it is not very correct to do a quarter analysis just with weeks. That't why you should consider having just a data column...
Best Regards,
Eric Antunes
01-04-2004 is week 14 but Q2
Week 14 have some days in Q1 and some others in Q2. So it is not very correct to do a quarter analysis just with weeks. That't why you should consider having just a data column...
Best Regards,
Eric Antunes
Each and every day is a good day to learn.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2005 10:44 PM
тАО01-27-2005 10:44 PM
Solution
hi,
you can use the query below to clear all confusions about quarters!:
yd@MYDB.MU> r
1 select dt, to_char(dt,'Q'), mod(to_char(dt,'Q')+1,4)+1
2 from (select add_months(trunc(sysdate,'y'), rownum-1 ) dt
3* from all_objects where rownum <= 12 )
DT T MOD(TO_CHAR(DT,'Q')+1,4)+1
__________ _ __________________________
01/01/2005 1 3
01/02/2005 1 3
01/03/2005 1 3
01/04/2005 2 4
01/05/2005 2 4
01/06/2005 2 4
01/07/2005 3 1
01/08/2005 3 1
01/09/2005 3 1
01/10/2005 4 2
01/11/2005 4 2
01/12/2005 4 2
12 rows selected.
Elapsed: 00:00:00.02
yd@MYDB.MU>
regards
Yogeeraj
you can use the query below to clear all confusions about quarters!:
yd@MYDB.MU> r
1 select dt, to_char(dt,'Q'), mod(to_char(dt,'Q')+1,4)+1
2 from (select add_months(trunc(sysdate,'y'), rownum-1 ) dt
3* from all_objects where rownum <= 12 )
DT T MOD(TO_CHAR(DT,'Q')+1,4)+1
__________ _ __________________________
01/01/2005 1 3
01/02/2005 1 3
01/03/2005 1 3
01/04/2005 2 4
01/05/2005 2 4
01/06/2005 2 4
01/07/2005 3 1
01/08/2005 3 1
01/09/2005 3 1
01/10/2005 4 2
01/11/2005 4 2
01/12/2005 4 2
12 rows selected.
Elapsed: 00:00:00.02
yd@MYDB.MU>
regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2005 10:47 PM
тАО01-27-2005 10:47 PM
Re: select week and year 1 year in the past
hi,
This is about statistics reporting, so a variance might be accepted. It's not about for example interest on your bank account which you want to be correct to the day.
A real date might simplify things, but you can do without. It always depends; maybe you cannot/may not change the table.
regards,
Thierry.
This is about statistics reporting, so a variance might be accepted. It's not about for example interest on your bank account which you want to be correct to the day.
A real date might simplify things, but you can do without. It always depends; maybe you cannot/may not change the table.
regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2005 11:43 PM
тАО01-27-2005 11:43 PM
Re: select week and year 1 year in the past
Thank u for all advices they are all very conductive.
U r right that Q statistics are not very exact but I have my data only in week resolution than how to make a avg and sum over part of the week?
I can change that table however I want.
I just get this data from excel sheets and they are stored there in this format. I used the same format and thats it.
Mod function is very usefull it solves quite a lot ;-))
U r right that Q statistics are not very exact but I have my data only in week resolution than how to make a avg and sum over part of the week?
I can change that table however I want.
I just get this data from excel sheets and they are stored there in this format. I used the same format and thats it.
Mod function is very usefull it solves quite a lot ;-))
- « Previous
- Next »
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP