Fine Duplicate rows & Delete duplicate rows

Fine duplicate row SELECT ColumnName, COUNT(ColumnName) AS ColumnName FROM tbl_Employee_M GROUP BY ColumnName HAVING ( COUNT(ColumnName) > 1 ) Delete duplicate rows WITH DUPLICATE(ROW,GROUPROW,ID,FNAME,LNAME) AS ( SELECT ROW,GROUPROW= CASE WHEN ID=ID THEN (SELECT COUNT(*) FROM (SELECT ROW_NUMBER() OVER (ORDER BY ID) AS ROW, ID,LNAME,FNAME FROM MYTABLE ) AS A WHERE A.ID=B.ID AND A.ROW<B.ROW)+1 END,ID,FNAME,LNAME FROM …

Pivot in SQL Server

Declare @table1 table ( SalesPerson varchar(50), Product varchar(50), SalesAmount float ) insert into @table1(SalesPerson,Product, SalesAmount) values (‘Bob’, ‘Pickles’, 100) insert into @table1(SalesPerson,Product, SalesAmount) values (‘Sue’, ‘Oranges’, 50) insert into @table1(SalesPerson,Product, SalesAmount) values (‘Bob’, ‘Pickles’, 25) insert into @table1(SalesPerson,Product, SalesAmount) values (‘Bob’, ‘Oranges’, 300) insert into @table1(SalesPerson,Product, SalesAmount) values (‘Sue’, ‘Oranges’, 500) select * from @table1 …

Crystal report XML file as DataSource

Namespace: using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Web; Global variable: CrystalDecisions.Web.Report rpt = new CrystalDecisions.Web.Report(); CrystalDecisions.CrystalReports.Engine.ReportDocument rpt1; Onbutton or Page Load or any event rpt.FileName = Server.MapPath(“EventHistory.rpt”); crdata.Report = rpt; rpt1 = crdata.ReportDocument; crp.ReportSource = rpt1; crp.RefreshReport(); crp.DataBind();

Client System TimeZone Offset

The getTimezoneOffset method returns an integer value representing the number of minutes between the time on the current machine and UTC. These values are appropriate to the computer the script is executed on. If it is called from a server script, the return value is appropriate to the server. If it is called from a …