Seems this question comes up quite a bit, as it did here. And then since my boss also was asking me how this is done, I'd figure that I'd post a solution.
Read more →
OK, Gotta admit to being floored by this.
First I would like to know how many people have heard of this.
Second I would like to go on to describe what this is, how it happens, and how your Ghosts are exorcised.
Read more →
I really like to avoid doing database design based on existing data structures. I really prefer to start with a functional flow of the business, target the data (be it existing electronic data, memo;s, post it's, whatever, data is data) for each function, organize all the data across functions into general entities, then take all of the data elemets or attributes and associate them with the higher level Entities.
Read more →
I've been having to parse DB2 Load Cards and to extract a lot of data (Like starting postion, Length, Column name, ect) you need parse the data out of the card based on delimiters.
Read more →
Update: 11/19/2009 No! Not that kind of fun with your date. It seems lately a lot of Date conversion questions have been popping up. So I'd thought I'd list them all here with their solutions and the author that has supplied them.
Read more →
I'm sure Nigel or Tara alread have blogged this, but it was asked for and I scratched one up.Anyone have any horror stories with something like this?
EDIT: If you look in that thread, you'll see Pat Phelan's use of sp_MSForEachDb.
Read more →
OK, so I really never need a reason. The question ofter arises.
“How can I count the number of days between 2 dates, but exclude weekends and holidays”
EDIT: In this thread, Dr.
Read more →
By doing this with an identity Column on the row, you have a pseudo array for sql server. This user defined function will grab the nth occurance of a word in a string.
Read more →
This always seems to pop as well. To determine what objects are dependant on what you can use sp_depends. Unfortunately that's for 1 level of relationships in either direction (to the parent or the child).
Read more →
bcp fails to import data near reserved word.
[Doooh]Alrighty then. Thanks Tara(again) for pointing out the obvious. The resolution to this problem is the -q option. As BOL states, it sets quoted identifiers on in the context of the bcp thread.
Read more →
This pops up every so often, as it does Here. The post title is the DB2 syntax for achieving a unique index that allows for nulls. I always felt that since Nulls are not equal to anything, not even themselves, then how could you get a dup key violation.
Read more →
I swear that's what was posted. Mostly they want a header row in their data and they didn't want to use DTS...
bcp out with column names post
OK, here you go.
Read more →
OK...this is out there..based on this previous thread that I got a LOT of help on, SQL Team was asked a Question from MikeB to basically take a columns “key“ and marry a set of columns and place them all on 1 row, as a result set, or in to a table.
Read more →
OK, another one that seems to be often asked, and I'm sure there's a SQL Team article out there...I'm just lazy. Anyway, this post got me interested in this again (and I always have trouble trying to remember the answer), so I decided to post some solutions, so I don't have to remember.
Read more →
OK, so I got tired of writing this...so I decided to build a bells and whistles full database search. Now at first blush, the reaction that this is bad....and it is.
Read more →
Starting at a user defined location in a string to find the nth occurance of a target string's starting location
EDIT: OK, I got Jay's set based method to work. And I mistook Jay for Jay White (Page47) but I was wrong (but I should be given a pass, because it's just like what Mr.
Read more →
OK, it seems often asked how to return values from dynamic sql. My initial reastion was to do something like the following. Which works, is flexible, is highly dynamic, and does take a bit of setup
Read more →
I've seen recently a lot of people with quite a proliferation of databases on a single server. I'm not sure why this is, but it may be a “personalized” database per client, so each client has their own replica of a database for an application.
Read more →
Seems to be a popular question people seem to look for. I Still don't know why. Kinda hard to perform set processing against data put in this form. I forget the first day I saw this, or from whom, but I always reference this article on the great SQLTeam Site.
Read more →
Just got an email from http://www.sql-server-performance.com/default.asp
And they had a great link to an article from Brian Knight that discusses Disaster recovery and is “A Survival Toolkit for the DBA“. It even comes with a bunch of scripts already written.
Read more →