SQL Group by a range of value using T-SQL

Target audience: SQL programmers Used tools: T-SQL What’s the purpose: group records from SQL data table using aggregate functions with derived tables Now, let’s try to make the ‘job’ with t-sql only. The key point here is to use aggregate functions with so called derived tables.In this article http://logicalread.solarwinds.com/when-to-apply-sql-server-derived-table we can find a definition and… Continue reading SQL Group by a range of value using T-SQL

Published
Categorized as SQL

Read parameters for SQL store procedure from XML variable

Target audience: SQL programmersUsed tools: SQL,XPathWhat’s the purpose: read parameters for SQL query from XML variable Well – the problem is to count all records from a SQL table which satisfy a condition in WHERE clause – like this WHERE table.field > = minVal AND table.field<=maxVal minVal and maxVal are parameters. This is very easy… Continue reading Read parameters for SQL store procedure from XML variable

Published
Categorized as SQL