March 2004 Blog Posts

  • A BCP GUI

    Due to the excessive amount of BCP work that has plagued me recently, I was sick and tired of typing.Instead of writing a script in TSQL to build BCP commands, I decided on building a little GUI app. I have tried to constrain the interface to only allow valid BCP argument combinations, but again due to laziness, I have not tested them all. If the BCP command appears to be doing nothing, you have the option to KILL the process. Features: Easy to use. (should be!) Tool tips for each switch are taken from BOL Batch option for building (not...

  • Worst Column Name Ever

    While moving some data between servers via BCP from a database that I have never seen before, I noticed that several of the tables failed to load into the target server. The error message was something along the lines of "Could not cope with *". What the hell was that! I was using the native switch so the first thing I did was check the schema of the two... And what do you know... There is a column (the goddamn Key column) with a "*" in its name... Just beautiful......

  • An overlap constraint in SQL2K

    A future requirement of 3 applications we support, is that they will be competing for a resource that they all share. In this case it is a series of Rooms for appointments. The overlap constraint will ensure that a room cannot be overbooked. After a discussion with the middle and interface tier developers, it was decided that this should be enforced in the Database at DDL time and not via code, Stored Procedures or triggers, No surprise that they where happy with that decision... The attributes we are concerned with are RoomID SMALLINT, StartDate SMALLDATETIME and EndDate SMALLDATETIME Someone asked why we aren't using...