2003-07-02
637 reads
2003-07-02
637 reads
2003-07-02
399 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
265 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
84 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
491 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
299 reads
This script generates seril numbers (0, 1, 2, 3.4,,,)In this example I use 0 - 9999
2003-06-19
160 reads
By Steve Jones
One of the language changes in SQL Server 2025 that I’ve seen a lot...
By Steve Jones
I hosted this month, but I decided to put my own entry in as...
By Chris Yates
I get asked a lot about why or how I began working with databases...
I’ve been thinking a lot about the role of consulting in engineering projects. Having...
Hi experts, I’ve been going through several articles and videos about Columnstore indexes, but...
Recently stood up a 2022 Enterprise server. Have 8 publications with subscriptions on a...
I get a new SQL Server instance from my build team. How can I tell if the instance was installed using a slipstream installation later?
See possible answers