T-SQL

Technical Article

Dynamically Generating HTML Tags from T-SQL

  • Script

Here's a real-life challenge I was faced with at work: my company (a talent agency) needed me to create a report listing all of our actors that we represent - and for each actor, a comma-delimited string of each production that they've starred in.  Simple enough, right......except that, within the comma-delimited list of productions, they […]

You rated this post out of 5. Change rating

2003-04-11

683 reads

Technical Article

Date Only

  • Script

This is a follow-on to info's script to strip the time portion of a datetime or smalldatetime, leaving only the date.  I found info's script interesting!  When I had to do this I converted the date to varchar and back again instead of to float.  Seems to work fine for me.

You rated this post out of 5. Change rating

2003-04-03

115 reads

SQLServerCentral Article

Gathering Random Data

  • Article

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.

5 (1)

You rated this post out of 5. Change rating

2003-03-26

9,244 reads

Technical Article

Weekly Reports Made Easy

  • Script

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', […]

You rated this post out of 5. Change rating

2003-03-13

300 reads

Technical Article

Bitmap an Integer Value

  • Script

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 […]

You rated this post out of 5. Change rating

2003-03-07

419 reads

Technical Article

A Simple way to find the line of script.

  • Script

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 […]

You rated this post out of 5. Change rating

2003-02-24

116 reads

Blogs

A New Word: Mottleheaded

By

mottleheaded – adj. feeling uneasy when socializing with odd combinations of friend and family,...

Democratizing Core Contributions: A Guide to WordPress.org Badges 

By

In the WordPress community, badges aren’t just for scouts.

Microsoft Purview GA menu’s

By

The new data governance features in Microsoft Purview are now being made generally available...

Read the latest Blogs

Forums

test new topic

By philip.scott

posting a new topic

New article

By Steve Jones - SSC Editor

Comments posted to this topic are about the item New article

Monitoring Azure Blob Storage

By arindamxs

Comments posted to this topic are about the item Monitoring Azure Blob Storage

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers