Sometimes it's necessary to strip non-numeric characters from the string, so you can convert to integer without error. Often it happens when you want to use stored procedure, especially system procedures. The output there can be already with some characters (MB, KB and such), but you want this result to be used for your own purposes as integer or print the result with order by integer part of column. This function is equivalent of Cint or Int in other languages.
You can customize this function by implementing your own rules as far as ASCII characters allowed.
The second script details how it’s used to show all tables with their size-related metrics ordered by Reserved size.
As functions supported only in SQL 2000, this scalar function is to work under SQL 2000 only.
Get a summarized report of all DataBases options
This SELECT will give you a summarized report for the options selected for ALL the databases on your SQL Server. It's compatible with versions 7 and 2000.
2002-07-11
648 reads