T-SQL

Technical Article

Haversine Calculation in User Defined Function

  • Script

Uses the haversine formula to calculate distance between 2 long / lat points.  This can be used with a zip code / lat and long table that are available from the census bureau or post office.The @R can be tweaked dependent on what gives you the best result (its the radius of the earth, fluctuates […]

You rated this post out of 5. Change rating

2003-09-25

736 reads

Technical Article

Get Column Lists script

  • Script

This is a script like Column_Gitter by Rick Bolin (RickInMesa), it differs in the fact that it does not use cursors, it optionally adds the table name, it handles UDDT (User Defined Data Types) properly, and handles the new SQL Server 2000 datatypes.Usage: Open this script in QA, Change QA to the desired Database, Edit […]

5 (1)

You rated this post out of 5. Change rating

2003-09-24

714 reads

Technical Article

Replace Mult Instances of a Pattern in a String

  • Script

This function takes a pattern to be searched for, a string that the pattern will be removed from and a flag to determine whether all instances of the pattern should be removed.This is sort of an expanded version of a function I wrote to remove multiple spaces from a string.

You rated this post out of 5. Change rating

2003-08-20

177 reads

Technical Article

Column_Gitter Part Deux

  • Script

This script is similar to Column_Gitter.  I noticed this script and wanted to present the same output without the use of cursors.  Both scripts work well and produce the same results.  This little utility comes in handy if you do a lot of SQL coding. Given a table name, it'll return four results: The names […]

You rated this post out of 5. Change rating

2003-08-14

90 reads

Technical Article

ISINTEGER function

  • Script

This function is similar to the ISNUMERIC native function, but tests for a valid integer.  ISNUMERIC can return false positive results when testing for a valid integer.  For example this select returns a value of 1 (true):select isnumeric('3d8')For 6.x and 7.0, you can easily convert it to a procedure.

5 (3)

You rated this post out of 5. Change rating

2003-08-14

2,824 reads

Blogs

My 2024 in Data: Music

By

This is my last week of the year working (I guess I come back...

A New Word: Suente

By

suente– n. the state of being so familiar with someone that you can be...

Side Projects

By

Anyone (everyone?) who has ever tried to learn a programming language knows that to...

Read the latest Blogs

Forums

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Timeout Error while executing a TSQL statement in Sql server Express Edition

By IT researcher

I am getting the below error when I execute a SQL command in SQL...

Sql script replace and rearrange numbers

By diegodeveloper

Hi everyone. I have this table and this information. (left side of the image)...

Visit the forum

Question of the Day

DCL

We have DDL, DML, and DCL. What is DCL used for?

See possible answers