Archive for the Uncategorized Category

All Rows value into comma seprated values into one single variable

Posted in Sql server 2005, SQL Server 2008, Uncategorized on March 23, 2010 by bimal4u

declare @SQLCol nvarchar(max), @TableName nvarchar(max)
select @SQLCol = COALESCE(@SQLCol+’,’,”)+ sc.COLUMN_NAME FROM information_schema.columns sc
where sc.COLUMN_NAME like ‘%ColumnName%’ and sc.TABLE_NAME = @TableName
order by sc.COLUMN_NAME asc

Print @SQLCol

Note:
COALESCE() : This function returns single value of collect all the values with user defined format. Here for each records i used ‘,’ but you can use anything you want for seperation. This is very good function provided by SQL server.

Get All tables infromation from the database

Posted in Uncategorized on March 23, 2010 by bimal4u

SELECT * from sysobjects where xtype =’U’

Enter register key into the system

Posted in Uncategorized on July 19, 2007 by bimal4u

  Microsoft.Win32.RegistryKey ckey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@”SYSTEM\CurrentControlSet\Services\service1″, true);
            if(ckey != null)
            {
                if(ckey.GetValue(“Type”) != null)
                {
                    ckey.SetValue(“Type”, ((int)ckey.GetValue(“Type”) | 256));
                }
            }

Krugle developer search engine

Posted in Uncategorized on June 22, 2007 by bimal4u

You can search source code/project in any language through this search engine. 

Please click on below link.

Developer search engine

Free SMS in all over india

Posted in Uncategorized on June 20, 2007 by bimal4u

You can sent daily two sms in all over india through this below link.

Free SMS in all over india