Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Select Records Within Date Range

Posted on April 24, 2013October 26, 2015 By David Kittell

This query include the start and end date.

SELECT
	*
FROM
	table
WHERE
	datefield BETWEEN '<start date>' AND '<end date>'
Originally Posted on April 24, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code MSSQL

Post navigation

Previous post
Next post

Related Posts

Format Zip Code Properly

Posted on November 11, 2013October 26, 2015

Sometimes a zip code is presented in a database with all nine numbers in the same column that has only five numbers. This query below will assist in formatting the numbers properly. SELECT CASE WHEN len(zip) = 10 AND substring(zip, 6, 1) = ‘-‘ THEN zip WHEN len(zip) = 5…

Read More

Run SQL Statement

Posted on August 1, 2013October 26, 2015

protected string sRunSQLStmnt(string sSQL) { string sReturn = ""; //Declare the connection object SqlConnection sqlConn = new SqlConnection(connString); int numberOfRecords = 0; try { //Make the connection sqlConn.Open(); //Declare the Command SqlCommand sqlCommand = new SqlCommand(sSQL + " SELECT @@ROWCOUNT AS DELETED;", sqlConn); //Execute the query numberOfRecords = sqlCommand.ExecuteNonQuery(); }…

Read More

ICD-9 Generator

Posted on August 21, 2014October 26, 2015

<%@ Page Language="C#"%> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Collections.Generic" %> <%@ Import Namespace="System.Collections.Specialized" %> <%@ Import Namespace="System.Configuration" %> <%@ Import Namespace="System.Data.Common" %> <%@ Import Namespace="System.Data.SqlClient" %> <%@ Import Namespace="System.Drawing" %> <%@ Import Namespace="System.Drawing.Printing" %> <%@ Import Namespace="System.IO" %> <%@ Import Namespace="System.Net.Mail" %> <%@ Import Namespace="System.Text" %> <%@ Import Namespace="System.Text.RegularExpressions"…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes