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 →
Since, I'm tired of retyping this...If you want to get an answer fast about a database question (doesn't matter the platform) and it's sql related....Do this
Please state your problem in the context of a business requirement.
Read more →
No Kidding...I should have guessed that Bill was one. There's a boat load of MVPs. Let's see who we know. OK so 85 ain't a boat load.
I know or have spoken with
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 →
As of Oracle 8i (which I believe is no longer supported) there was no utility to unload data. I guess Oracle felt that once the got the data, there was no reason to relinquesh it.
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 →
Well there isn't one. If you read this post and your platform is SQL Server or Oracle, I hope you feel very fortunate that you have TRUNCATE TABLE <tablename>. It appears that in version 8, there is a callable procedure that is supplied by IBM, but it cannot be executed as a standard SQL command.
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 →