Miscellaneous

Technical Article

Change the User Defined Data type

  • Script

User Defined Data Types (UDF) is one of the useful concepts in SQL Server. However UDF can't be modified after they are being used. You would have to remove your User Defined Data Type from each table before you can change it. This will be a big job under certain circumstances.This procedure changes all tables […]

You rated this post out of 5. Change rating

2002-04-19

1,002 reads

Technical Article

Write Reports from SQL to Disk (Even HTML!)

  • Script

Ever need to write reports out to a folder? I have found that creating output files are SA-WEET! (and easy too) The sample script uses BCP to create an HTML file.This process works well for reports that need to be generated nightly and take too long to run in real time.  Use an SMTP mail […]

You rated this post out of 5. Change rating

2002-04-18

4,330 reads

Technical Article

Truncating and deleting all tables in a database

  • Script

Sometimes, during test stage, you may need to truncate or delete all your tables in a database, without droping constraints, truncating and recreating constraints (DRI). You can use the TRUNCATE TABLE statement to removes all rows from a table without logging the individual row deletes, but tables referenced by a FOREIGN KEY constraint can not […]

4.67 (3)

You rated this post out of 5. Change rating

2002-04-17

1,547 reads

Technical Article

Decimal to Binary Conversion for event scheduling

  • Script

This procedure was written to create an event schedule     where the schedule may have non-consecutive days.    The input for the procedure is START DATE, END DATE, and DAYMAP    The DAYMAP input parameter is a decimal number whose binary representation    describes the schedule days over potentially a 4 week period (read from right to left).    […]

You rated this post out of 5. Change rating

2002-04-17

293 reads

Technical Article

Get users permissions with mapping thru role.

  • Script

This procedure is similar to sp_helpprotect except to extends a bit on the concept with roles involved. If for instance a user has right on a TableX but they are not mapped directly to the user but instead to a role then sp_helpprotect does not tell you this. This will tell you how the user […]

You rated this post out of 5. Change rating

2002-04-16

1,703 reads

Technical Article

List of triggers in a database

  • Script

Give the following information, about triggers in the database.Parent_Name      Parent_Type Name                         Type               Insert Update Delete IsFirstInsertTrigger IsFirstUpdateTrigger IsFirstDeleteTrigger IsLastInsertTrigger IsLastUpdateTrigger IsLastDeleteTrigger

4.5 (2)

You rated this post out of 5. Change rating

2002-04-16

820 reads

Technical Article

Preventing accidental overwrites with update SPs

  • Script

Say you wanted to create an SP for updating records in a database.  How would you do this in such a way as to allow your users to edit only a subset of fields in the record, without overwriting the other fields, and without requiring verbose IF blocks and CASE statements in your code?Simple.  Use […]

You rated this post out of 5. Change rating

2002-04-16

198 reads

Blogs

Advice I Like: Experience and Aptitude

By

Experience is overrated. Most breakthrough accomplishments were done by people doing them for the...

Plan Time for Self-Development

By

As you begin the new year, if you don't already have time set aside...

BK’s Bookshelf: Never Split the Difference

By

I picked up Never Split the Difference: Negotiating As If Your Life Depended On...

Read the latest Blogs

Forums

The Rise of Data Centers

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Rise of Data Centers

Data API Builder APIs

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Data API Builder APIs

Why you should avoid Implicit Measures in your Power BI model

By Koen Verbeeck

Comments posted to this topic are about the item Why you should avoid Implicit...

Visit the forum

Question of the Day

Data API Builder APIs

What formats of API endpoints can the Data API Builder present to clients when exposing the database?

See possible answers