2003-07-02
398 reads
2003-07-02
398 reads
SUBSTR returns a portion of char, beginning at character @StartPos, @Length characters long. If @StartPos is 0, it is treated as 1. If @StartPos is positive, Oracle counts from the beginning of char to find the first character. If @StartPos is negative, Oracle counts backwards from the end of char.
2003-07-02
264 reads
UDF that returns a DATETIME which is the concatination of the TIME portion of one DATETIME and the DATE portion of another.EXAMPLES:DECLARE @Date DATETIME, @Time DATETIMESET @Date = '7/1/03 16:00'SET @Time = '5/16/1999 9:30 AM'PRINT dbo.FN_AddDateTime(@Date,@Time )RETURNS: Jul 1 2003 9:30AMPRINT dbo.FN_AddDateTime(@Date,0)RETURNS: Jul 1 2003 12:00AM
2003-07-01
94 reads
This script is useful when want find out the list of the object on a given filegroup.
2003-07-01
223 reads
This function is based on a script by Tim Dietrich (tim@timdietrich.us) named format_height.sql. His function took what he called a decimal representation of a measurement and formatted it as feet and inches. In reality the input value was just a measurement formatted to look like a decimal number but it was not a true decimal […]
2003-06-27
83 reads
While we are exploring the possibility to build data-driven application whose GUI are all dynamically generated according to database objects' extended property, we find the system provided procedures: sp_addextendedproperty, sp_dropextendedproperty,sp_updateextendedproperty can add extended property to only one object each time, while fn_listextendedproperty can not let you search objects to display their extended property. […]
2003-06-27
490 reads
A proc which gets a list of all databases (Exluding "excluded" ones) and backs them up.The backup files are stored in the directory \DatabaseName\DatabaseName.bakUNC names are supported provided SQL Server has write access to the location.It deletes backups older than x (Current 3) days.This can be changed.Add a job to execute the script of proc […]
2003-06-26
702 reads
Sometimes you have to deal with denormalized database.And specially when links to another table are stored in oneof the fields as comma delimited list of IDs.This script shows how to make a single SELECT statement to fetch linked records
2003-06-23
296 reads
This script generates seril numbers (0, 1, 2, 3.4,,,)In this example I use 0 - 9999
2003-06-19
159 reads
This script will resize the data file of a passed in database name and filename by 10%. It can run in 3 modes.Resize, INFO, HELP. RESIZE is passed into parameter @Mode when we know the database name and file we wish to resize. INFO is passed in when we only know the database name and […]
2003-06-19
650 reads
Welcome back, my fellow sleuths, to my mystery-inspired blog series! I’m having a ton...
By Steve Jones
This was one of the original values: The facing page has this text: No...
By Chris Yates
For decades, enterprises have thought about data like plumbers think about water: you build...
Comments posted to this topic are about the item Create an HTML Report on...
Comments posted to this topic are about the item Database Ledger in SQL Server...
Comments posted to this topic are about the item Azure SQL Database MAXDOP
When Azure SQL Database was originally released, the MAXDOP was set to 0 for each new database. In Oct 2025, what is the default value for Azure SQL databases?
See possible answers