Tangra Inc.
  • HOME
  • SERVICES
  • PRODUCTS
  • BLOG
  • CONTACT US
  • Search
  • Menu Menu
  • The Wisdom of the Geeks

    Random Ramblings About Technology

Plamen Ratchev

Shortest Path for Friend Connections

February 20, 2008/5 Comments/in SQL Server/by Plamen Ratchev

An interesting problem to solve is finding relation paths in contact management systems. This is a limited case of the Dijkstra’s algorithm for finding the shortest path in a graph. Here we always have cost of 1 for each path and it is a two-way relation between the nodes. To put this in human readable […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-02-20 01:01:002017-02-07 15:21:21Shortest Path for Friend Connections
Plamen Ratchev

Column Alias Based on Variable

February 18, 2008/9 Comments/in SQL Server/by Plamen Ratchev

Although formatting output belongs to the reporting or front-end interface, occasionally there could be the need to change a column alias based on variable. Since T-SQL does not support proving variable as column alias in a query, here are two methods to handle that. CREATE TABLE Foo ( keycol INT PRIMARY KEY, datacol CHAR(1)) INSERT INTO Foo VALUES […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-02-18 09:49:002017-02-11 07:55:00Column Alias Based on Variable
Plamen Ratchev

Performing UPSERT in T-SQL

February 13, 2008/0 Comments/in SQL Server/by Plamen Ratchev

Very often there is the need to check if a key value exists to perform an update, and if it does not exist to insert new data. The upcoming SQL Server 2008 provides the MERGE statement (MERGE actually allows to do more: simultaneous UPDATE, INSERT and/or DELETE operations on the table), but until it is […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-02-13 14:56:002017-02-11 07:55:34Performing UPSERT in T-SQL
Plamen Ratchev

Table Value Constructors in SQL Server 2008

January 21, 2008/2 Comments/in SQL Server/by Plamen Ratchev

One of the new features of SQL Server 2008 is the support for table value constructors (part of ANSI SQL). Here are a couple quick examples of using them. — Populate sample table CREATE TABLE Foo (  keycol INT PRIMARY KEY,  datacol VARCHAR(30)); In the past, populating table rows was done like this: INSERT INTO Foo […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-01-21 17:35:002017-02-11 07:56:04Table Value Constructors in SQL Server 2008
Plamen Ratchev

Calculating Work Hours

January 15, 2008/17 Comments/in SQL Server/by Plamen Ratchev

Calculating work hours is a very frequent need in scheduling, billing, payroll, and time and attendance applications. Normally this is best done using an auxiliary Calendar table which provides easy way for calculation and flexibility to account for holidays and other events. However, sometimes the requirements are simplified and the point of interest is only […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-01-15 23:15:002017-02-11 07:56:33Calculating Work Hours
Plamen Ratchev

Unique Column with Multiple NULLs

January 10, 2008/1 Comment/in SQL Server/by Plamen Ratchev

A very frequent need is to define unique column that allows multiple NULL values. Since the UNIQUE constraint considers two NULL values the same, it allows only a single NULL value. Here is one solution for this problem using a view filtering on non NULL values with UNIQUE index on the view. CREATE TABLE dbo.Foo […]

Read more
https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png 0 0 Plamen Ratchev https://www.tangrainc.com/wp-content/uploads/2017/02/tangra-logo3.png Plamen Ratchev2008-01-10 22:34:002017-02-11 07:56:58Unique Column with Multiple NULLs
Page 11 of 17«‹910111213›»

Categories

  • .NET Framework
  • best practices
  • Binding
  • books
  • CLR
  • Cryptography
  • Custom User Controls
  • Excel
  • LINQ
  • mobile
  • NativeScript
  • obfuscation
  • PASS
  • Security
  • Silverlight
  • SQL Server
  • sql server compact
  • SQLRally
  • SQLSaturday
  • WCF
  • WPF
  • XAML
  • XML

Archives

  • August 2018
  • June 2017
  • March 2017
  • February 2017
  • April 2016
  • March 2016
  • October 2011
  • May 2011
  • February 2011
  • January 2011
  • October 2010
  • August 2010
  • July 2010
  • February 2010
  • January 2010
  • August 2009
  • June 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007

SITE MAP

  • HOME
  • SERVICES
  • PRODUCTS
  • BLOG
  • CONTACT US
  • TERMS
  • PRIVACY

SEARCH

Copyright © 2025 Tangra Inc.
Scroll to top