String Parsing
User Defined function to parse a string with known delimiters and return back the substing in the position.Takes string,delimiter and position as parameters. Can be used directly in TSQL code.
2003-03-27
336 reads
User Defined function to parse a string with known delimiters and return back the substing in the position.Takes string,delimiter and position as parameters. Can be used directly in TSQL code.
2003-03-27
336 reads
Brian Knight recently had the basic need to retrieve a record from the database at random. What seemed to be an easy task quickly became a complex one. This case showed an interesting quirk with T-SQL that was resolved in an equally quirky way. This quick article shows you a method to retrieve random data or randomize the display of data.
2003-03-26
9,391 reads
Each week you are required to run various reports based on table entries made during the week preceding latest Sunday. Use this SQL7/2000 procedure (can be a UDF in SQL2K) to retrieve the latest midnight of a specified day of the week as illustrated below: Declare @StartDate datetime, @EndDate datetime Exec DBAservice.dbo.uspGetLatestWkDayMidnight @pDate = '1998-05-06', […]
2003-03-13
318 reads
Do you hate using bitwise operands? I do, a lot. I wrote the following function to try to minimize the need for using them. When testing 'status' variables in the 'sysobjects' table, for example, I decided there just had to be an easier way to see if bit 31 is set than asking if STATUS […]
2003-03-07
767 reads
You can use this procedure to find any word or sentance, which u used in procedures, views, triggers and function. This procedure is basically a modified form of system procedure "sp_helptext". Now its upto you to use that and modified that. To execute the procedure, first create it in your Database and then execute it […]
2003-02-24
151 reads
This is a little script I wrote before I saw Steve Jones write up on Tame Those Strings Part 7. This is a slightly diffent approach. It will take a string up to 255 chars and case every word first letter upper and the rest of the word lower. This ain't the best way but […]
2003-02-20
423 reads
Ever wanted to know how to reuse identity values after they're deleted? In this example by Dinesh, he shows you two methods to reuse the wholes in identity rows.
2003-02-18
8,727 reads
Steve Jones recently got bit by a bug the reminded him of the Y2K fiasco. Read about the problem and how Steve solved the problem.
2003-02-17
4,616 reads
This procedure refresh all views of current database in good order to recreate correct dependencies lost after updating views.This procedure just call sp_refreshview and uses temporary tableExecution of this procedure prevent errors in DTS Import/Export wyzard : Copy objects and data between SQL Server databasesexec refresh_all_views_in_order -- in current database and all dependencies are ok […]
2003-02-13
748 reads
MetaData_TableDependenceOrder Lists User tables in foreign key dependence order.I use this to determine data load order without having to disable foreign key constraints accepts a database name (required) and an optional comma delimited list of tables to filter the dependency list with. If tablelist is not passed, it returns all tables with a load ranking […]
2003-02-12
150 reads
By Steve Jones
For a number of years, we’ve produced the State of the Database Landscape report,...
By Steve Jones
I coach volleyball and I do a lot of stat stuff on paper. I...
By Steve Jones
dolorblindness – n. the frustration that you’ll never be able to understand another person’s...
Comments posted to this topic are about the item The Power of Data and...
Comments posted to this topic are about the item What's the Date?
Comments posted to this topic are about the item Two New Shortcuts for Fabric...
In SQL Server 2025, there is a new function that returns the current date without the time. What is it?
See possible answers