• Home
  • About / F.A.Q.
  • Contact
  • Files
  • Links
  • Videos
Blue Orange Green Pink Purple

Archive for the ‘Web Development’ Category

You can use the search form below to go through the content and find a specific post or page:

Dec 05

Getting Range In DB2

DB2 is the database bane of my online existence. It doesn’t support even the most basic of SQL commands, let alone handy dandy functions such as LIMIT and the seriously-limited-but-none-the-less-useful TOP found in MySQL and an assortment of other SQL databases. So how am I supposed to select a range of recordsin DB2? With nested selects. Its ugly, I don’t think its too efficient, and so I don’t have to go hunting for something like this ever again, its here:

SELECT *

FROM table_name t1

WHERE startrow <= (SELECT COUNT(*)
FROM table_name t2
WHERE t1.key > t2.key)

AND endrow > (SELECT COUNT(*)
FROM table_name t2
WHERE t1.key > t2.key)

ORDER BY table_key

If anybody knows of a better way, please share.

Nov 23

RegEx Date Mask

The other day I searched for a hour and a half tp find a simple regular expression the would validate a date field with a mask of either mm/dd/yyyy or m/d/yyyy to no avail. All I could find were expressions that either were a mile in length or for some-reason-or-another wouldn’t work with my Coldfusion app. I just needed something super simple, so after a little reading I wrote my own. And so I won’t have to go hunting for this guy again, here is what I can up with:

(0[1-9]|[1-9]|1[012])[- /.](0[1-9]|[1-9]|[12][0-9]|3[01])[- /.](19|20)\d\d

« Newer Posts

PaulHobson.com

Just me trying to figure stuff out.

  • Flickr
  • Gamer Tag
    AmbientEX
  • Categories
    • 100 Words
    • Conservatism In Exile
    • Disney
    • Everything Else
    • Five For Friday
    • Found Around The Net
    • Funny
    • GI Joe
    • Home Movies
    • Life going-ons
    • Logan (formerly Spunky)
    • Movies
    • Music
    • Other Words
    • Pictures
    • Poetry
    • Quest for Faith
    • Quotes
    • Really!?
    • Site News
    • Thoughts
    • Up To The Minute
    • Video
    • Video Games
    • Web Development
    • Xbox 360
  • Recent Articles
    • Zogby Poll Lessens My Hope For America
    • Attention Americans
    • A Random Thought About Star Trek and Shield Frequency Modulations
    • Logan: 8 Months Old!
    • Mr. Moran…. Really?
    • If Starbucks Acted Like Most Churches Do…
    • Thoughts About Obama’s Second Day On The Job
    • Thoughts About Obama’s First Day On The Job
    • Logan Hobson For President in 2048!!
  • Archives
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
  • Search






  • Home
  • About / F.A.Q.
  • Contact
  • Files
  • Links
  • Videos

© Copyright PaulHobson.com. All rights reserved.

Back to Top