using System.Text.RegularExpressions; ... public static string RemoveHTML(string in_HTML) { return Regex.Replace(in_HTML, "<(.|\n)*?>", ""); }
Posted by at 30th January, 2009
create function getDayOfWeek (@date datetime) returns varchar(10) as begin declare @retVal varchar(10) select @retVal= case datepart(dw,@date) when 1 then 'Sun' when 2 then 'Mon' when 3 then 'Tue' when 4 then 'Wed' when 5 then 'Thu' when 6 then 'Fri' when 7 then 'Sat' end return @retVal end
Then you can just call it as any other function in a select (or however you need it):
select dbo.getDayOfWeek(getdate())
Posted by at 29th January, 2009
USE [dbName] GO CREATE TABLE #temp ( table_name sysname , row_count INT, reserved_size VARCHAR(50), data_size VARCHAR(50), index_size VARCHAR(50), unused_size VARCHAR(50)) SET NOCOUNT ON INSERT #temp EXEC sp_msforeachtable 'sp_spaceused ''?''' SELECT a.table_name, a.row_count, COUNT(*) AS col_count, a.data_size FROM #temp a INNER JOIN information_schema.columns b ON a.table_name collate database_default = b.table_name collate database_default GROUP BY a.table_name, a.row_count, a.data_size ORDER BY CAST(REPLACE(a.data_size, ' KB', '') AS integer) DESC DROP TABLE #temp
Posted by at 29th January, 2009
using System.Text.RegularExpressions; ... public static string RemoveHTML(string in_HTML) { return Regex.Replace(in_HTML, "<(.|\n)*?>", ""); }
Posted by at 29th January, 2009
Reference articles:
Posted by at 18th December, 2008
Possible Cause:-
When you install IIS AFTER .NET 2.0 framework, the rights of the ASPNET user had not been set correctly.
Resolution
Repair (Uninstall if repair does not work for you) .NET Framework 2.0
Simply run the following from command line to reset the IIS registry settings for aspnet user. Usually framework directory for .Net Framework 2.0 resides under C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
References:-