Wednesday, December 13, 2017

IS Ram Sethu is True ?






Monday, December 11, 2017

How to find duplicate records from sql server Table and Delete

How to find the duplicate record ?

Finding duplicate record from table using CTE.

WITH CTE
AS
(SELECT NAME,EMP_ID,ROW_NUMBER()
OVER(PARTITION BY NAME ORDER BY NAME)
AS NAMEDUP FROM EMPLOYEE)
SELECT * FROM CTE WHERE NAMEDUP > 1 ORDER BY NAME

Using Having Count

SELECT NAME,COUNT(NAME)FROM EMPLOYEE
GROUP BY NAME HAVING COUNT(*)>1

Using group by

SELECT NAME,COUNT(NAME) AS CNT
FROM EMPLOYEE
GROUP BY NAME

Deleting duplicate records from the table.

WITH CTE
AS
(SELECT NAME,EMP_ID,ROW_NUMBER()
OVER(PARTITION BY NAME ORDER BY NAME)
AS NAMEDUP FROM EMPLOYEE)
DELETE FROM CTE WHERE NAMEDUP > 1



Wednesday, December 6, 2017

How to set Sql Server Mode In IIS in ASP.NET ?

1.We need not to create a  new database We have a tool called aspnet_regsql.exe tool (Aspnet registersql).
This tool is present in c:\windows\Microsoft.net\framework64\version.
2.In the Run command window prompt we have to run below mentioned commands
A.In that mentionpath where the tool exists,Toolname -s Sqlservername -E(Means windowauthentication) -ssadd(Add support for SQL serve sessionmode -sstype p(MeansSession variables will store in ASP state sql server database)
3.Need to set mode to SQLserver
<sessionstate mode="SqlServer" sqlconnectionstring="datasource=.; userid="username" pwd="p***"/>




What are the Event Handlers that can be included in the Global.asax file ?

There total 5 events in global.aspx file
1. Application_start
 --- When ever first instance of HTTPApplication class created.
2.Application_Error:
-- When ever unhandled exception occurs in the Application
3.Application_End
--- When ever last instance HTTPApplication class destryoyed.
4.Session_Start :
 -- user visits the application.
5. Session_End :
   --- When the session state is set to inproc then this event gets fired.

Amazon.in


Don't Copy

Protected by Copyscape Online Plagiarism Checker

Pages

Offers