Thursday, October 21, 2010

Lunched .NET Community web Portal

Dear My Friends,

I have launch the new .NET Community website to help to all developers and software professionals than more this blog.

Please visitor, you can find all latest technologies articles, tips and codesnippet in www.codegain.com

even you can publish your blog or articles and etc in www.codegain.com

I'm planning to open article competition,it will help to all the developers and software professional to show their talent and earn or win free gifts and cash prizes.


Thank you

Thursday, May 21, 2009

How to insert records from te one table to another table in SQL

Hi Guys,

Last time i watch in the forums, one gentleman ask the question , how to insert records to one table from the another table in Sql Server.

This actually simple. and we can do this two ways.

1.normal way

insert into desttableName select * from databaseName.dbo.sourceTableName;


2.You can use the OpenRowSet also

INSERT INTO YourTableName

SELECT *

FROM OPENROWSET(BULK 'SQLNCLI', 'Server=(local);Trusted_Connection=yes;', 'SELECT Columns FROM Database.Schema.Tablename ORDER BY columns)


Thank you
Keep It Watch

Monday, May 4, 2009

how to get how many records entered in day by a user in sql server.

Hi Guys,

Last time i look at the one fourm there one one question how do know how many records entered in per day by a user.

i thought in my mind make a script to that.

Script:

SELECT COUNT(*) From Tablebname
where CreatedDate=GetDate() and UserName=@UserName;


Note:You need keep a column for DateOfCreation in you table.

Thank you
Keep It Watch.

How to select random records in SQl Server.

Hi Guys,

Most of the developers, asking in forums how to select random records from the database in Sql Server.

Here script:

SELECT TOP 5 employeeID, FName,LName from Employee
ORDER BY NEWID();



Thank you
Keep It Watch

Friday, April 24, 2009

Welcome

Hi Guys

Welcome to my Sql Server and MySql Resource blog.Please keep watch i will update soon useful material here.

Thank you
Keep It Watch