Monthly Archives: March 2012

Text data type can not be ordered or unioned

It was astonished for me that databases like MS SQL and Sybase do not support ordering and union by columns of the TEXT type (and some other data types, in short big data blobs). It seems the reason is logical. … Continue reading

Posted in Microsoft SQL Server, Sybase | Leave a comment

Unary Negative in MS SQL

Occurred that ┬áMS SQL also is not so perfect. Recently I was pointed to rsdn.ru where was shown a mathematical feature of the MS SQL: ref A. SELECT 20.0 / -2.0 / 5.0 * 3.0 results into -16.666666 ref B. … Continue reading

Posted in Microsoft SQL Server | Leave a comment

Get Columns of Particular Type in Database (Sybase)

The procedure below allows you to get a column list of a particular type in a database currently used: CREATE PROCEDURE dbo.GetColumnOfType @type longsysname AS SELECT c.name, t.name, * FROM syscolumns c LEFT OUTER JOIN systypes t ON t.type = … Continue reading

Posted in Sybase, T-SQL | Leave a comment

Exceptions that could not be caught

A curious question was raised during one of a conducted interview. Could the StackOverflowException be caught? I thought it could. And it was but only until framework v2. Since the second framework it is impossible to catch such an exception, … Continue reading

Posted in .NET, C# | Leave a comment

Drop a sql schema with its referencing objects

As you may know if you want to drop a schema in sql you have to drop all its objects by hands first (tables, views, procedures, functions). Of course this restriction is essential to avoid loosing of data. But if … Continue reading

Posted in Microsoft SQL Server, T-SQL | Leave a comment