Skip to main content

Select Data From Between Rows

SELECT * FROM
(
   SELECT ROW_NUMBER() OVER(ORDER BY SortColumn) NUM,
   * FROM  YourTable
) A
WHERE NUM > 40 and NUM < 60

Comments

Popular posts from this blog

Change Key Dynamically in Web.Config

System.Xml; private void SetConfigSettings() { string path = Server.MapPath("Web.config"); string newConnectionString = @"Server=local;Database="+txtDatabaseName.Text+";Trusted_Connection=true"; XmlDocument xDoc = new XmlDocument(); xDoc.Load(path); XmlNodeList nodeList = xDoc.GetElementsByTagName("appSettings"); XmlNodeList nodeAppSettings = nodeList[0].ChildNodes; XmlAttributeCollection xmlAttCollection = nodeAppSettings[0].Attributes; xmlAttCollection[0].InnerXml = txtKey.Text; // for key attribute xmlAttCollection[1].InnerXml = newConnectionString; // for value attribute xDoc.Save(path); // saves the web.config file }

select all checkboxes in a table javascript

function checkAll(bx,dg) {                                         var tbl = document.getElementById(dg);                                         for (var index = 1; index < tbl.rows.length; index++) {                                             var cbs = tbl.rows[index].getElementsByTagName('input');                ...