Geeks With Blogs

  • tfanshteyn Awesome: tracert about 796 days ago
  • tfanshteyn RT @AdviceMallards When searching plane tickets online, delete your cookies. Prices go up if you visit a site multiple times. about 800 days ago
  • tfanshteyn RT @unhealthytruth Junk food costs about $1.76 per 1,000 calories versus $18.16 per 1,000 calories for nutritious foods about 824 days ago
  • tfanshteyn RT @NYCSchools Just announced: School days lost due to #Sandy will be made up February 20-22 and June 4. about 879 days ago

An educated guess (Timur Fanshteyn) Technology, Software Development and other ways to make an educated guess about the world... April 2008 Entries
SQL ROW_NUMBER() function and Audit tables
I had to search through an audit table to find times when the value changes in a specific field. Considering an audit table DateModified DateTime ID varchar() Quantity decimal Price decimal I wanted to find the rows when Quantity changed for the same ID. I've been able to accomplish that using the ROW_NUMBER function of SQL 2005 Here's the query: select Row_Number() OVER (PARTITION BY ID Order BY ID, DateModified) as RowID, DateModified, Quantity, ID INTO #TempData from AuditTable select a.ID, b.DateModified, ......

Posted On Thursday, April 10, 2008 6:16 AM

Yuneta's Blog
A friend of mine started a blog and started posting nice support entries. http://yunetasblog.blogspot... Technorati Tags: Blogs, Tips CrossPosted from ......

Posted On Thursday, April 10, 2008 6:15 AM

Copyright © Timur Fanshteyn | Powered by: | Join free