Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • 1997 Toyota Corolla Parts Store

    Toyota Parts and Books on Amazon.com

    September 28, 2007
  • Calculate average daily mileage required to make yearly goal

    This might be useful if you’re programming a running site. For me, however, I wanted to write this calculation in SQL Server to expand my knowledge some. –Calculates the average daily mileage needed to meet a target yearly mileage goal, based on current mileage.CREATE FUNCTION averageDistanceNeeded (@targetMileage decimal(10,4), @currentMileage decimal(10,4))RETURNS decimal(10,4)ASBEGIN Declare @daysLeft decimal(10,4) Declare…

    September 11, 2007
  • Further refined version of code searching

    I have now included views in the search code version. Both functions now return the object type the result was found in. –Searches stored procedures, functions and views for code– containing the stringtosearchCREATE FUNCTION findTextInCode (@StringToSearch varchar(100))RETURNS @fNames TABLE (search varchar(100), name sysname, type char(2))ASBEGIN SET @StringToSearch = ‘%’ + @StringToSearch +’%’ INSERT @fNames SELECT…

    September 6, 2007
←Previous Page
1 … 281 282 283 284 285 … 317
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress