Top Discount Coupons Website

Date April 19, 2009

Super Discount Shop

This web site offers discount coupons on all major categories with top selling merchants like SkinStore discount coupons, Proform discount coupons, Swanson coupons, BodyBuilding coupons and The Planet coupons etc.

Seasonal Vitamins

This website offers discount coupons of Herbal related merchants and products like 1-800-Contacts Discount Coupons and SkinStore Discount Coupons etc.

Latest Discount Coupons

This website is offering latest discount coupons in top categories with selected discounted stores like WalMart Coupons, FigLeaves Coupons, Dell Discount Coupons, and eVitamins Discount Coupons etc.

SQL Server Date Formats

Date June 4, 2009

One of the most frequently asked questions in SQL Server forums is how to format a datetime value or column into a specific date format.  Here’s a summary of the different date formats that come standard in SQL Server as part of the CONVERT function.  Following the standard date formats are some extended date formats that are often asked by SQL Server developers.

It is worth to note that the output of these date formats are of VARCHAR data types already and not of DATETIME data type.  With this in mind, any date comparisons performed after the datetime value has been formatted are using the VARCHAR value of the date and time and not its original DATETIME value.

Standard Date Formats
Date Format Standard SQL Statement Sample Output
Mon DD YYYY *

HH:MIAM (or PM)

Default SELECT CONVERT(VARCHAR(20), GETDATE(), 100) Jan 1 2005 1:29PM *
MM/DD/YY USA SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY] 11/23/98
MM/DD/YYYY USA SELECT CONVERT(VARCHAR(10), GETDATE(), 101) AS [MM/DD/YYYY] 11/23/1998
YY.MM.DD ANSI SELECT CONVERT(VARCHAR(8), GETDATE(), 2) AS [YY.MM.DD] 72.01.01
YYYY.MM.DD ANSI SELECT CONVERT(VARCHAR(10), GETDATE(), 102) AS [YYYY.MM.DD] 1972.01.01
DD/MM/YY British/French SELECT CONVERT(VARCHAR(8), GETDATE(), 3) AS [DD/MM/YY] 19/02/72
DD/MM/YYYY British/French SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS [DD/MM/YYYY] 19/02/1972
DD.MM.YY German SELECT CONVERT(VARCHAR(8), GETDATE(), 4) AS [DD.MM.YY] 25.12.05
DD.MM.YYYY German SELECT CONVERT(VARCHAR(10), GETDATE(), 104) AS [DD.MM.YYYY] 25.12.2005
DD-MM-YY Italian SELECT CONVERT(VARCHAR(8), GETDATE(), 5) AS [DD-MM-YY] 24-01-98
DD-MM-YYYY Italian SELECT CONVERT(VARCHAR(10), GETDATE(), 105) AS [DD-MM-YYYY] 24-01-1998
DD Mon YY * - SELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY] 04 Jul 06 *
DD Mon YYYY * - SELECT CONVERT(VARCHAR(11), GETDATE(), 106) AS [DD MON YYYY] 04 Jul 2006 *
Mon DD, YY * - SELECT CONVERT(VARCHAR(10), GETDATE(), 7) AS [Mon DD, YY] Jan 24, 98 *
Mon DD, YYYY * - SELECT CONVERT(VARCHAR(12), GETDATE(), 107) AS [Mon DD, YYYY] Jan 24, 1998 *
HH:MM:SS - SELECT CONVERT(VARCHAR(8), GETDATE(), 108) 03:24:53
Mon DD YYYY HH:MI:SS:MMMAM (or PM) * Default +

milliseconds

SELECT CONVERT(VARCHAR(26), GETDATE(), 109) Apr 28 2006 12:32:29:253PM *
MM-DD-YY USA SELECT CONVERT(VARCHAR(8), GETDATE(), 10) AS [MM-DD-YY] 01-01-06
MM-DD-YYYY USA SELECT CONVERT(VARCHAR(10), GETDATE(), 110) AS [MM-DD-YYYY] 01-01-2006
YY/MM/DD - SELECT CONVERT(VARCHAR(8), GETDATE(), 11) AS [YY/MM/DD] 98/11/23
YYYY/MM/DD - SELECT CONVERT(VARCHAR(10), GETDATE(), 111) AS [YYYY/MM/DD] 1998/11/23
YYMMDD ISO SELECT CONVERT(VARCHAR(6), GETDATE(), 12) AS [YYMMDD] 980124
YYYYMMDD ISO SELECT CONVERT(VARCHAR(8), GETDATE(), 112) AS [YYYYMMDD] 19980124
DD Mon YYYY HH:MM:SS:MMM(24h) * Europe default + milliseconds SELECT CONVERT(VARCHAR(24), GETDATE(), 113) 28 Apr 2006 00:34:55:190 *
HH:MI:SS:MMM(24H) - SELECT CONVERT(VARCHAR(12), GETDATE(), 114) AS [HH:MI:SS:MMM(24H)] 11:34:23:013
YYYY-MM-DD HH:MI:SS(24h) ODBC Canonical SELECT CONVERT(VARCHAR(19), GETDATE(), 120) 1972-01-01 13:42:24
YYYY-MM-DD HH:MI:SS.MMM(24h) ODBC Canonical

(with milliseconds)

SELECT CONVERT(VARCHAR(23), GETDATE(), 121) 1972-02-19 06:35:24.489
YYYY-MM-DDTHH:MM:SS:MMM ISO8601 SELECT CONVERT(VARCHAR(23), GETDATE(), 126) 1998-11-23T11:25:43:250
DD Mon YYYY HH:MI:SS:MMMAM * Kuwaiti SELECT CONVERT(VARCHAR(26), GETDATE(), 130) 28 Apr 2006 12:39:32:429AM *
DD/MM/YYYY HH:MI:SS:MMMAM Kuwaiti SELECT CONVERT(VARCHAR(25), GETDATE(), 131) 28/04/2006 12:39:32:429AM

Here are some more date formats that does not come standard in SQL Server as part of the CONVERT function.

Extended Date Formats
Date Format SQL Statement Sample Output
YY-MM-DD
SELECT SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 3, 8) AS [YY-MM-DD]
SELECT REPLACE(CONVERT(VARCHAR(8), GETDATE(), 11), ‘/’, ‘-’) AS [YY-MM-DD]
99-01-24
YYYY-MM-DD
SELECT CONVERT(VARCHAR(10), GETDATE(), 120) AS [YYYY-MM-DD]
SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 111), ‘/’, ‘-’) AS [YYYY-MM-DD]
1999-01-24
MM/YY SELECT RIGHT(CONVERT(VARCHAR(8), GETDATE(), 3), 5) AS [MM/YY]

SELECT SUBSTRING(CONVERT(VARCHAR(8), GETDATE(), 3), 4, 5) AS [MM/YY]

08/99
MM/YYYY SELECT RIGHT(CONVERT(VARCHAR(10), GETDATE(), 103), 7) AS [MM/YYYY] 12/2005
YY/MM SELECT CONVERT(VARCHAR(5), GETDATE(), 11) AS [YY/MM] 99/08
YYYY/MM SELECT CONVERT(VARCHAR(7), GETDATE(), 111) AS [YYYY/MM] 2005/12
Month DD, YYYY * SELECT DATENAME(MM, GETDATE()) + RIGHT(CONVERT(VARCHAR(12), GETDATE(), 107), 9) AS [Month DD, YYYY] July 04, 2006 *
Mon YYYY * SELECT SUBSTRING(CONVERT(VARCHAR(11), GETDATE(), 113), 4, 8) AS [Mon YYYY] Apr 2006 *
Month YYYY * SELECT DATENAME(MM, GETDATE()) + ‘ ‘ + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [Month YYYY] February 2006 *
DD Month * SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ‘ ‘ + DATENAME(MM, GETDATE()) AS [DD Month] 11 September *
Month DD * SELECT DATENAME(MM, GETDATE()) + ‘ ‘ + CAST(DAY(GETDATE()) AS VARCHAR(2)) AS [Month DD] September 11 *
DD Month YY * SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ‘ ‘ + DATENAME(MM, GETDATE()) + ‘ ‘ + RIGHT(CAST(YEAR(GETDATE()) AS VARCHAR(4)), 2) AS [DD Month YY] 19 February 72 *
DD Month YYYY * SELECT CAST(DAY(GETDATE()) AS VARCHAR(2)) + ‘ ‘ + DATENAME(MM, GETDATE()) + ‘ ‘ + CAST(YEAR(GETDATE()) AS VARCHAR(4)) AS [DD Month YYYY] 11 September 2002 *
MM-YY SELECT RIGHT(CONVERT(VARCHAR(8), GETDATE(), 5), 5) AS [MM-YY]

SELECT SUBSTRING(CONVERT(VARCHAR(8), GETDATE(), 5), 4, 5) AS [MM-YY]

12/92
MM-YYYY SELECT RIGHT(CONVERT(VARCHAR(10), GETDATE(), 105), 7) AS [MM-YYYY] 05-2006
YY-MM SELECT RIGHT(CONVERT(VARCHAR(7), GETDATE(), 120), 5) AS [YY-MM]

SELECT SUBSTRING(CONVERT(VARCHAR(10), GETDATE(), 120), 3, 5) AS [YY-MM]

92/12
YYYY-MM SELECT CONVERT(VARCHAR(7), GETDATE(), 120) AS [YYYY-MM] 2006-05
MMDDYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 1), ‘/’, ”) AS [MMDDYY] 122506
MMDDYYYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 101), ‘/’, ”) AS [MMDDYYYY] 12252006
DDMMYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 3), ‘/’, ”) AS [DDMMYY] 240702
DDMMYYYY SELECT REPLACE(CONVERT(VARCHAR(10), GETDATE(), 103), ‘/’, ”) AS [DDMMYYYY] 24072002
Mon-YY * SELECT REPLACE(RIGHT(CONVERT(VARCHAR(9), GETDATE(), 6), 6), ‘ ‘, ‘-’) AS [Mon-YY] Sep-02 *
Mon-YYYY * SELECT REPLACE(RIGHT(CONVERT(VARCHAR(11), GETDATE(), 106), 8), ‘ ‘, ‘-’) AS [Mon-YYYY] Sep-2002 *
DD-Mon-YY * SELECT REPLACE(CONVERT(VARCHAR(9), GETDATE(), 6), ‘ ‘, ‘-’) AS [DD-Mon-YY] 25-Dec-05 *
DD-Mon-YYYY * SELECT REPLACE(CONVERT(VARCHAR(11), GETDATE(), 106), ‘ ‘, ‘-’) AS [DD-Mon-YYYY] 25-Dec-2005 *

* To make the month name in upper case, simply use the UPPER string function.

(Courtesy: sql-server-helper.com)

First Service Pack of SQL Server 2008

Date May 5, 2009

SQL Server 2008 First Service Pack (SP1) is now available. Service Pack 1 (SP1) focused on essential updates only, primarily roll-ups of cumulative updates 1 to 3 and fixes to issues reported through the SQL Server community. SP1 eases deployment and management of Service Packs by introducing Slipstream, Service Pack Uninstall, and Report Builder 2.0 Click Once capability.

List of the bugs that are fixed in SQL Server 2008 Service Pack 1

KB Article Title
944390 FIX: Error message when you connect to a named instance of SQL Server on a client computer that is running Windows Vista or Windows Server 2008: “Specified SQL server not found” or “Error Locating Server/Instance Specified”
955769 FIX: The Shared Memory protocol for an instance of SQL Server 2008 is always enabled and the VIA protocol for the instance is always disabled after you repair the instance
956021 FIX: The About, Execute, and Close buttons are missing when you run the Execute Package Utility in the Chinese (Taiwan) version of Microsoft SQL Server 2008
956031 FIX: Error message when you estimate the compression on a table in SQL Server 2008: “Subquery returned more than 1 value”
956427 You cannot add a cluster node when you install SQL Server 2008 Analysis Services and you do not install the SQL Server 2008 Database Engine
958778 FIX: The default instance name is set incorrectly to SQLEXPRESS when you install SQL Server 2008 Express
959001 FIX: The Log Reader Agent skips some transactions when the Log Reader Agent runs to replicate transactions for a transactional replication in SQL Server 2005 and in SQL Server 2008
959025 FIX: Error message when you call a stored procedure that returns a rowset which has the DBPROP_MAXROWS rowset property or the SSPROP_MAXBLOBLENGTH rowset property specified: “The incoming tabular data stream (TDS) protocol stream is incorrect”
959026 FIX: Error message when you run a DB2 query that uses the WITH UR query hint in SQL Server 2005 Analysis Services and in SQL Server 2008 Analysis Services: “OLE DB error: OLE DB or ODBC error: An unexpected token “WITH” was found following “<Query>”"
961126 FIX: Error message when you run a maintenance plan in SQL Server 2008: “The SQL Server Execute Package Utility requires Integration Services to be installed”
961271 FIX: In a SQL Server 2008 Reporting Services report that contains several levels, some items disappear when you collapse another item
961633 FIX: A SQL Server 2008 Reporting Services report is displayed incorrectly in Mozilla Firefox if the report is displayed by using the ReportViewer control
962900 FIX: Error message when you run a query that involves an outer join operation in SQL Server 2008: “Attempting to set a non-NULL-able column’s value to NULL”
963070 FIX: You cannot edit or debug an SSIS package in BIDS when SQL Server 2008 Enterprise Edition, Standard Edition, Developer Edition, or Evaluation edition is installed without the SSIS feature
963658 FIX: PAGE compression is removed from a SQL Server 2008 data table after you shrink the database
967470 FIX: Error message when you perform an update or a delete operation on a table that does not have a clustered index created in SQL Server 2008: “The operating system returned error 1450″
967984 FIX: When you process a full-text catalog in SQL Server 2008, the operation stops responding
968587 FIX: The aggregate value is incorrect when you design a query that contains some entity groups by using the Report Model Query Designer in SQL Server 2008 or in SQL Server 2005
968599 FIX: Error message when you try to specify the SQL Server 2008 Reporting Services account as the credential for a report server in SharePoint Central Administration: “Unable to connect to Report Server WMI provider”
968693 FIX: A query that uses parameters and the RECOMPILE option returns incorrect results when you run the query in multiple connections concurrently in SQL Server 2008
968829 FIX: Error message when you try to upgrade an instance of SQL Server 2005 to SQL Server 2008: “Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes”
968830 FIX: An incorrect version is displayed on the Instance Selection page when you use SQL Server 2008 Setup to upgrade an instance of SQL Server 2008
968828 FIX: The system objects may not be checked as expected when you use different policy evaluation modes in SQL Server 2008

For full reference of bug list fixed in service pack 1.

You can download SQL Server 2008 SP1 from the Microsoft Download Center.

Business Intelligence with SQL Server 2008

Date May 2, 2009

Microsoft SQL Server 2008 provides a scalable Business Intelligence platform optimized for data integration, reporting, and analysis, enabling organizations to deliver intelligence where users want it.

Top New Features

  • Create high-performance Analysis Services solutions with optimized cube designers, subspace computation, and MOLAP-enabled writeback capabilities.
  • Implement enterprise-scale Reporting Services solutions through new on-demand processing and instance-based rendering.
  • Build flexible and effective reports with the new Tablix data structure and rich formatting capabilities.
  • Expand reach, and empower more users through optimized integration with the 2007 Microsoft Office system.
Integrate and manage all data

Use the enterprise-scale data warehouse platform of SQL Server 2008 to efficiently implement and manage unified storage for all of your business data.

Boost data warehouse performance

  • Integrate large volumes of data into your data warehouse faster by using SQL Server 2008 Integration Services, and consolidate real-time data by capturing data changes.
  • Increase the manageability and performance of large tables with partitioning, which enables you to manage growing volumes of data and users of your SQL Server 2008 data warehouse more efficiently.

Consolidate all data for optimized reporting and analysis

  • Work with all of your data and interact the way you want through support for both relational and non-relational data, including new data types such as FILESTREAM & Spatial.
  • Incorporate data from multiple sources directly into a single report.
  • Use the data source view to integrate data from across the enterprise and create a Unified Dimension Model that consolidates data from heterogeneous, enterprise-wide data stores, such as SQL Server, Oracle, DB2, SAP and Teradata, to create a holistic view of your business, helping end users gain enterprise-wide insight.

Subscribe to Technology Tips

Subscribe to Saqib-Ansari via RSS

Or, subscribe via email: