Oracle - Get Months/Weeks/Days for a Date range, then outer join statistics so that there are no missing Months/Weeks/Days. I had do produce data so that graphs could be build For a date range By Months/Weeks/Days Where sometimes there are zeroes (gaps) in the data. for whichever Months/Weeks/Days Lets say that you need to graph 4 months of monthly summarized Coupon Data in date range ‘1/18/2007’ to ‘4/12/2007’ for 3 Coupons (A, B, C) from CouponStats in another table that points to Coupons. In order ......
Oracle - Select a list of months for a Date Range Case 1 – the 13 months between '10/18/2007' & '11/17/2008' select add_months (trunc (to_date('10/18/2007','MM/D... 'MM'), 1*Level -1) Month FROM Dual CONNECT BY Level <= MONTHS_BETWEEN(to_date('11/... to_date('10/18/2007','MM/DD... + 1 order by month MONTH ---------------------- 1-Oct-2007 1-Nov-2007 1-Dec-2007 1-Jan-2008 1-Feb-2008 1-Mar-2008 1-Apr-2008 1-May-2008 1-Jun-2008 1-Jul-2008 1-Aug-2008 1-Sep-2008 1-Oct-2008 ......
Building a DAL using Strongly Typed TableAdapters and DataTables in VS 2005 and ASP.NET 2.0 Scott Mitchell's Masterpiece: http://www.asp.net/learn/da... http://weblogs.asp.net/scot... http://msdn2.microsoft.com/... http://aspalliance.com/914_... ......
Option Strict On Option Explicit On Partial Public Class myWebForm Inherits System.Web.UI.Page Dim _objDatasetToExcel As New DatasetToExcel() Dim _showExcel As Boolean = False Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Try '--------------------------... 'build showEnlargeButton '--------------------------... If Request.QueryString("showEx... Is Nothing Then ......
Option Strict On Option Explicit On Imports Microsoft.VisualBasic Imports System.Data.OracleClient Imports System.Data Imports System.Configuration Imports System Imports System.Web.HttpContext Imports System.Diagnostics Public Class DataAccess Private Shared oConn As New OracleConnection() Private Shared sConnString As String Private _objCommand As OracleCommand Private _objAdaptor As New OracleDataAdapter Dim _strMsg As String = "" Dim _strMsgCode As String = "" Public Function GetDataset(ByVal ......
1) Last 180 days of Monday Starts: with weeks as ( select trunc(sysdate - 180, 'DAY') + 1 - 7 + (P.pivot*7) monday_start from dual D, (select rownum pivot from all_objects where rownum < ((((sysdate - (sysdate - 180)) + 1 ) / 7)) + 2) P order by monday_start ) select * from weeks 2) Weeks for specified data range Public Function Select_Weeks( _ ByVal Start_DateString As String, _ ByVal End_DateString As String, _ ByRef sSql As String) As DataSet Dim returnDs As New DataSet Try 'select 'trunc(to_date('02/2/1980',... ......
Dim monthsDictionary As New Dictionary(Of String, Date) monthsDictionary = objDataAccess.Select_Months... _sEnd_Date) '--------------------------... 'loop thru monthsDictionary Items '--------------------------... Dim kvpCounter As Integer = -1 Dim kvpMax As Integer = monthsDictionary.Count - 1 For Each kvp As KeyValuePair(Of String, Date) In monthsDictionary kvpCounter += 1 '--------------------------... ......