If you need to start at index 1, use or WEEKDAY() + 1
.
Example:
Source: https://stackoverflow.com/questions/1202919/mysql-dayofweek-my-week-begins-with-monday
Client–server software application which the client(end user) runs in a web browser
Read moreUse WEEKDAY()
instead of DAYOFWEEK()
, it begins on Monday.
If you need to start at index 1, use or WEEKDAY() + 1
.
Example:
Source: https://stackoverflow.com/questions/1202919/mysql-dayofweek-my-week-begins-with-monday
SELECT
OWNER, segment_name,segment_type,TABLESPACE_NAME, sum(bytes/1024/1024/1024) GB
from dba_segments
where SEGMENT_TYPE = 'TABLE'
AND TABLESPACE_NAME = 'CLAIM_DATA'
AND owner = 'CLAIM'
group by OWNER, segment_name,segment_type,TABLESPACE_NAME;
SELECT df.tablespace_name "Tablespace",
totalusedspace "Used MB",
(df.totalspace - tu.totalusedspace) "Free MB",
df.totalspace "Total MB",
ROUND(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace)) "% Free"
FROM
(SELECT tablespace_name,
ROUND(SUM(bytes) / 1048576) TotalSpace
FROM dba_data_files
GROUP BY tablespace_name
) df,
(SELECT ROUND(SUM(bytes)/(1024*1024)) totalusedspace,
tablespace_name
FROM dba_segments
GROUP BY tablespace_name
) tu
WHERE df.tablespace_name = tu.tablespace_name;
© Pseudo IT Knowledge Base 2014 . Powered by Blogger templates and RWD Testing Tool