Scripts

Technical Article

Synchronize the DB user SID with the Login SID

If you attach a DB on an SQL Server different from the SQL Server where the DB was initially created, you will usually come up with a situation where a login will be a DB user however, you cannot see this through the login properties screen. That happens because the name of the login exists […]

You rated this post out of 5. Change rating

2005-04-21 (first published: )

1,396 reads

Technical Article

Update statistics in all database (sp_updatestats)

This script permit executes the sp_updatestats in all databases at same time.First I create the stored procedure above in an admin database, for sample I create one database with ADMIN name where I put all administration objects create for me. You can create this sp in exist db, if you want.Now you can execute this […]

4.5 (2)

You rated this post out of 5. Change rating

2005-04-14 (first published: )

4,147 reads

Technical Article

Find maximum values for all "int" columns

/******************************************************** "CheckAllInts" Find all columns in all user tables in a database defined as "int", and get the maximum value for the column. Uses a cursor and logs the results to a table. (One-time CREATE TABLE statement at top of script). Successive runs over an appropriate period of time would allow one to find how […]

You rated this post out of 5. Change rating

2005-04-11 (first published: )

294 reads

Technical Article

getCalendarQTR

The script returns the quarter and year of a date submitted in the form of '105' - first quarter of 2005 - and is useful for grouping data by calendar quarter. Easy to modify for fiscal quarters.

You rated this post out of 5. Change rating

2005-04-07 (first published: )

86 reads

Technical Article

SQLCalcEngine - evaluate numeric expression

SQLCalcEngine - evaluate numeric expression similar to the VB eval function.The basic concept is to pass a string containing a numeric expression such as ((2+3)*(4/9)) and receive a numeric value back. The algorithm is based loosely on material found at http://www.arstdesign.com/articles/expression_evaluation.html, as well as material found in the book "Writing Compilers and Interpreters" by Ronald […]

You rated this post out of 5. Change rating

2005-03-31 (first published: )

315 reads

Blogs

Spark Connect Dotnet November 2024 Where are we?

By

All Spark Connect Posts Introduction There have been quite a few changes in the last...

A New Word: Ochisia

By

ochisia – n. the fear that the role you once occupied in someone’s life...

Create a Numbers Table in Power Query

By

This is a quick blog post, mainly so I have the code available if...

Read the latest Blogs

Forums

Pivot Help

By mashispano

Hi Guys I need help pivoting the following SELECT [ID],[code_name],,[retail_price] FROM products 1 |...

Writer methods in PowerQuery (LOL)

By pietlinden

I'm using PowerQuery in Excel on my desktop. (Yeah, I know you can do...

Need help with GROUP BY...

By iamjoe

Here's my data... I am trying to return total days in status for each...

Visit the forum

Question of the Day

The Density Vector

When building statistics, there is the concept of density that refers to the duplicates in a table. How is this calculated?

See possible answers