T-SQL

Technical Article

Generating sequential numbers - the fast way

  • Script

It is often necessary to generate a table with sequential numbers, up to a specified upper limit N. For small N, a simple INSERT in a WHILE loop will do. But, for large N, that solution becomes too slow. This script presents a different approach. It generates sequential numbers from the binary representation of N, […]

4.5 (2)

You rated this post out of 5. Change rating

2004-12-30 (first published: )

614 reads

Technical Article

Convert Numeric Figures into Words

  • Script

Hi guys    What about a function that converts a number figure into words.This sample script is to demonstrate the procedural capabilities of SQL Server . Samples  select fig2words(10) will give --Ten-- ,select fig2words(103) will give --one hundred and three --    The author uses much under utilized capability of SQL Server the recursive function calls to […]

You rated this post out of 5. Change rating

2003-11-11

551 reads

Technical Article

Strip Non-numeric characters from string function

  • Script

Sometimes it's necessary to strip non-numeric characters from the string, so you can convert to integer without error. Often it happens when you want to use stored procedure, especially system procedures. The output there can be already with some characters (MB, KB and such), but you want this result to be used for your own […]

5 (1)

You rated this post out of 5. Change rating

2003-11-10

1,301 reads

Technical Article

XML Encode UDF

  • Script

I routinely need to retrieve and package query result sets in an XML package.  The built in functions supported by SQL Server 2000 are effective, but are often more of a pain than a help.  This routine can be used in a simple select statement to XML encode the contents of a column during the […]

You rated this post out of 5. Change rating

2003-10-14

236 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