in

SQLServerCentral.com

The largest free SQL Server community.
All Tags » tips (RSS)

Browse by Tags

  • YASSAS ("Yet Another SQL Server Array Splitter")

    There are billions of VARCHAR -array-splitting routines out there to compensate for the lack of true Arrays and Array Parameters in SQL Server. In yesterday's blog I talked about passing in and splitting an array with more than 8,000 characters [the VARCHAR max]. Other times you might know that your...
    Posted to Pseudo-Random (Weblog) by Mike C on 03-10-2006
  • 8,001 Bytes And Beyond (SQL Arrays)

    I recently sat down to try to figure the best way to pass a comma-delimited array to a SQL Server 2000 stored procedure. The catch? It had to handle arrays larger than 8,000 bytes - the upper limit for VARCHAR data. SQL Guru and newsgroup regular Erland Sommarskog posted a great piece on parsing arrays...
    Posted to Pseudo-Random (Weblog) by Mike C on 03-09-2006
  • Sorting Book Chapters

    A while back a SQL newsgroup poster asked a question about sorting chapter numbers for a book in SQL. As anyone who's picked up a programming book or technical paper online knows, it's common practice to number chapters in the format '1.1', '2.1.3', '3.4.5.6', etc. The...
    Posted to Pseudo-Random (Weblog) by Mike C on 07-24-2005
  • What's That in 1940 Dollars?

    As you probably know by now, I just blog up whatever happens to catch my attention at any given time (hence the title). Today I saw a newspaper report that compared the value of money from the 1940's to today. So I says to myself, "Self, where do they get these numbers from?" After a little...
    Posted to Pseudo-Random (Weblog) by Mike C on 07-20-2005
  • Reading Text Files Into Tables

    A while back, someone asked me how to read a text file and store it in a table in SQL Server. Here's a short script that reads a text file into a Temp Table, then performs a SELECT to return all the rows in the table as a resultset that can be accessed from VB.NET or C#.NET via a SqlDataReader or...
    Posted to Pseudo-Random (Weblog) by Mike C on 07-19-2005
  • Calculating Floating Holidays

    This is a follow-up to the calculating Easter entry I posted yesterday. In this one we calculate "floating holidays", such as Thanksgiving (U.S.) and Memorial Day. Once again we need to use the udf_modulo function we created in the last entry. This function calculates the "true modulus"...
    Posted to Pseudo-Random (Weblog) by Mike C on 07-17-2005
  • Calculating Easter

    Updated Code Below. I recently had to create a SQL table representing a Calendar with various holidays noted on it for work scheduling purposes. One of the first challenges was figuring out on which day Easter falls each year. I came up with two options: 1) Manually create a table with all pre-calculated...
    Posted to Pseudo-Random (Weblog) by Mike C on 07-16-2005
Page 1 of 1 (7 items)
Copyright Red Gate Software
Powered by Community Server (Commercial Edition), by Telligent Systems