2004-09-25
587 reads
2004-09-25
587 reads
2004-09-25
84 reads
Many a times we need to split a string into its indivisual words and return a array like the Split function of Visal Basic which accepts a delimeter. Here is a script which assumes the delimeter to be the space character and works in a similar method.
2004-09-24 (first published: 2004-03-25)
166 reads
This functin returns the number of days in a month, given the month and the year. It does this by adding 1 month to the first of the month, substract 1 day and get the day part of the result.
2004-09-23 (first published: 2004-03-30)
122 reads
This is a simple stored procedure, for inclusion in your script writing efforts, that strips non-numeric data from a given varchar. This is most usefull in scripts used to clean-up data such as account numbers that may include spaces, dashes and the like.
2004-09-21
345 reads
To help maintain index quality, defragging of any given index is a good thing. This will defrag ALL indecies in the current DB. NOTE: Schedule for off-hours operations. For a massive re-write of indecies, change the remarking on "--IF @indid" lines to use reindex instead of just defragging.
2004-09-21
591 reads
This script creates 2 new system functions ****************************************** NEW: 1. functions will be case sensitive if database is 2. Replace all or only first occurence ****************************************** fn__regexp_test(@String,@Pattern) returns int execute the method test(@String) on the regular expressions @Pattern returns : 0 : no match 1 : match null : one of the parameters was null […]
2004-09-21 (first published: 2004-04-08)
530 reads
Simple enough routine that I've had to write I don't know how many times in different languages. It does what it says in the title i.e. kills multiple occurences of the whitespace character, leaving one behind to tell the tale.
2004-09-20 (first published: 2004-05-21)
152 reads
Given SQL text (@sql_txt) that will return XML data, run that XML data against an XSL template (@xsl_file_nm), and save the output to the specified outputfile (@out_file_nm). If @xsl_file_nm is not specified, then output is just saved as XML.This script is very usefull, but not secure. One could easily overload any of the script input […]
2004-09-17
321 reads
This Simple Function Let u get the Word Format From Numeric Value. Its just like NumericToWord Function in some prog. Languages.Just Copy and Paste it in SQL Query Analyzer and build it.Your Views are always welcomed at mayursid@yahoo.co.in
2004-09-17
122 reads
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
Telp/Wa 62 8218200233 Shopping Arcade, The Mansion At Kemang, Jl. Kemang Raya No.3-5, RT.1/RW.7,...
Telp/Wa 62 8218200203 Jl. Jend. Sudirman No.Kav.47, RT.5/RW.4, Karet Semanggi, Kecamatan Setiabudi, Kota Jakarta...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers