SQLInsider Scripts

Technical Article

Pagination in stored procedure

  • Script

You recently published a script showing how to do pagination (e.g. results 20 - 30 of 100) It's also possible to do it quicker and more elegantly without having to resort to building the sql string dynamically (never a good thing IMHO). You pass in 2 parameters, @PageIndex is the first record you want (so […]

4 (2)

You rated this post out of 5. Change rating

2006-05-31 (first published: )

1,262 reads

Technical Article

Data Driven Subscriptions in SQL RS Standard

  • Script

As many of you know, data driven subscriptions is not a feature available with SQL 2000 RS Standard Edition. However, you can accomplish this using the supplied stored procedure. It may not be as pretty as the version in SQL Enterprise, but this one gets the job done, and it is very ……useful!I have not […]

5 (1)

You rated this post out of 5. Change rating

2006-11-13 (first published: )

570 reads

Technical Article

Calculate distance between two points

  • Script

The calculation of distance between two points using standard spherical geometry can be inaccurate for short distances (ten miles or less) because the sine function of very small angles approaches zero. The haversine approach (http://en.wikipedia.org/wiki/Haversine_formula) turns this around, so it is very accurate at small distances but has larger errors (about ten miles) for points […]

4 (1)

You rated this post out of 5. Change rating

2006-05-18 (first published: )

633 reads

Technical Article

script to create default class in VB.NET

  • Script

The following script creates a class to access the default stored procs created by a previous script I submitted called script to create default stored procs. Please note that this will only work correctly if the stored procs created by my earlier script (script to create default stored procedures) have been created. Have fun

You rated this post out of 5. Change rating

2006-04-03 (first published: )

277 reads

Technical Article

script to create default stored procs

  • Script

The following script will write basic update insert and delete stored procedures for a given table.It will add comments to the sp's with the autyhors name and also script a single grant statement for a given database user.I find this script extremely useful for both rad development and keeping consistency in my naming and structure […]

5 (2)

You rated this post out of 5. Change rating

2006-04-21 (first published: )

535 reads

Technical Article

List any Object In Any Database On Server

  • Script

I found my self in a fimilar situation where I wanted to modify a table but was not sure how heavily it was used. So I started out with a script that just searched for a table. Then I tought to my self...self...What about all those times you want to expand a column or drop […]

You rated this post out of 5. Change rating

2006-01-16 (first published: )

414 reads

Technical Article

Scripting extended properties

  • Script

I use these to manage the addition and removal of extended properties on all tables and columns in my company's dbs.Rather than writing complicated joins or calling functions every time, I use views on sysobjects and INFORMATION_SCHEMA tables. I tried to make these scripts as flexible as possible so you can reuse them in procedures, […]

5 (1)

You rated this post out of 5. Change rating

2006-01-05 (first published: )

1,226 reads

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

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