|
|
Browse by Tags
All Tags » SQL » Date range
-
In addition to the T-SQL calendar table, which I have posted seperately, I went the whole hog and figured out the equivalent for Oracle. The only value I couldn't work out was the millisecond, which is not present on the standard date type in Oracle, but which can be retrieved and I am looking into this when I have time. This query uses the ...
-
After experimentation with various datepart and datename methods following my most recent blog post, I was able to identify many if not all the necessary components for constructing a calendar table.To do this I have combined these functions with the SQL to generate a list of dates as posted by Jamie some time ago. The resultant SQL is given ...
-
Recently my colleague challenged me to find a method for identifying the week ending date for the week which any given date belongs to; i.e. say for a gven date which happens to be a Tuesday, what is the date of the end of the week? In this example, week ending is defined as a Sunday, however depending on how your server is set up, ...
-
As promised in my original post on PL/SQL date ranges previously, below is a sql statement which can be used preceeding most queries in order to apply common date range lookups to the data the query returns. SQL Server Management Studio (SSMS) doesn't have an equivalent to the '&' functionality that TOAD has to ...
-
As part of my current role as a tester I am often required to write the same basic expressions again and again in my queries, most noticeably to bring back data for specific date ranges, therefore for the benefit of anyone else out there who has to do likewise I have detailed below my method for returning the following basic ranges:
Daily; Week ...
|
|
|