DotNet By Satya

Blog that contains articles about new technologies related or not with programming. I will describe and solves some problems that I encounter in my career. ASP .NET, AJAX, Javascript, C++, C# and SQL are some of the subjects that will appear.

15 November 2012

Customize sql startup query window from:

›
C:\Users\My-PC\AppData\Local\VirtualStore\Program Files (x86)\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SsmseeTemplates\Sql\Sql...
06 October 2012

Replace multiple spaces with one/none in sql server

›
select replace(replace(replace(LTrim(RTrim('      6      Spaces  6      Spaces.      ')),'  ',' |'),'| ',...

sort array of int values without using built-in functions (using Bubble sort)

›
string res = ""; int[] arr = { 800, 11, 50, 771, 649, 770, 240, 9 }; for (int k = 0; k < arr.Length; k++) { for (int i = 0; i ...
04 October 2012

split string in c# with regular expression instead of forloop

›
string s = "er32(s),re4'wr(a),f2.0(t)A(y),(a)";         s = Regex.Replace(s, @"[\w\s';.&,:]+\(([\w\d.]+)\)",...

Convert column to row in SQL Server

›
select (select convert(varchar(max),id)+',' from #tbl1 for xml path('')) colTOrow
11 September 2012

Get the html control to asp without using runat='server' property

›
string strValue = Page.Request.Form["name of the control"].ToString();

How to get the current row in the grid view rowcommand event

›
GridViewRow row = ((LinkButton)e.CommandSource).NamingContainer as GridViewRow; In RowDataBound for datakeys GridView1.DataKeys[e.Row.RowInd...
20 August 2012

persistedselection property for a gridview control in asp

›
You can specify how row selection is persisted when the GridView control is in paging mode. By default, row selection is persisted by row in...

datarow to dataset in asp

›
DataTable dt = (DataTable)ViewState["tabData"]; DataRow[] dr = dt.Select("test_cd='899'"); DataSet dsnew = new D...
15 August 2012

Query to attaching of database using only .mdf file without associated log file

›
CREATE DATABASE ... FOR ATTACH_REBUILD_LOG with log file: CREATE DATABASE ... FOR ATTACH

Order of the sqlquery that logically processed

›
What is the order of execution in the following list? select from where group by order by having A: from,where,group by,having,s...

Rename/Alter the column for a table in sqlserver

›
To add new column: Alter Table TableName add ColName dataType To alter a column: Alter Table TableName Alter Column ColumnName DataType NULL...
14 August 2012

can u set innerjoin for update command?

›
Update Employee set State = s.StateID   from Employee e   inner join State s on e.State = s.StateName

Decide whether i/p parameter contains integers or not in sqlserver

›
IF PATINDEX('%[0-9]%',@val) > 0   print 'i/p value contain integer' else print 'Not contain integer'
13 August 2012

Insert records (multiple) into a table using single query in sqlserver

›
create table tblEmp (eid int, ename varchar(20), estatus bit) sqlserver2005 basic: insert into tblEmp values (0,'emp', 'True...
‹
›
Home
View web version

DotnetBySatya About

satyabhaviri
View my complete profile
Powered by Blogger.