To delete records of from a specific table, the date column cannot be searched as another text/varchar column. The column needs to be converted to a specific format and and search needs to performed on it.
Example: To delete all records in the table where the dates are 2nd and 26th of March 2009, here [...]
Archive for the ‘SQL’ Category
SQL: Using dates in the WHERE clause
Posted in SQL, tagged SQL dates, sql dates in where, SQL Server 2008, Sydney, zee on March 23, 2009 | Leave a Comment »
SQL Server 2008 – Jump start !
Posted in SQL, tagged SQL server 2008 training, Sydney, Zeeshan on November 10, 2008 | 1 Comment »
If you are interested about the latest offerings in SQL Server 2008 …
A complete set of training material has been released by Microsoft – which is free to access and download. There are 05 tracks available
1) Overview
2) Database Infrastructure
3) Business Intelligence track
4) Developer track (software + service)
5) Application compatibility and upgrade
Also, the virtual [...]
SQL : Deadlock priority
Posted in BizTalk 2006 R2, SQL, tagged BizTalk 2006 R2, SET DEADLOCK PRIORITY, SQL, Sydney, zee, Zeeshan on September 15, 2008 | Leave a Comment »
While using BizTalk with SQL, I have often come across scenarios where my database instances are being deadlocked. Mostly this has happened because another instance of my application has access to it.
One of the great things about BizTalk – is the retry functionality of the ports. Even, if my resources are deadlocked - BizTalk would retry [...]
SQL: View locks on your database
Posted in SQL, tagged BizTalk, locks, SQL: View locks on your database, Zeeshan Shah on July 4, 2008 | Leave a Comment »
It is generally a good practice -during dev work to view the impact that your components could have your application database. Of the many analysis that could be done in this regard , one such metrics is the monitoring of locks. SQL provides one such stored proc called the sp_lock. In using this, I have to filter [...]
Failed to connect to server "machinename" (Microsoft.SqlServer.SmoEnum)
Posted in SQL, tagged Failed to connect to server "machinename" (Mi, SQL Server 2005, Zeeshan Shah on June 16, 2008 | Leave a Comment »
To reproduce the error..
Created a SQL login – Windows Authentication
The default DB = myTempDb
Deleted myTempDb using the Sql Server Management Studio.
Solution:
Change the default Db to master and it solves the problem..
sp_defaultdb ‘MyDomain\Zeeshan’, master