SQL Server Management Studio

Ah… SQL Server. How I loathe thee.

For example, here are all the annoying things that I have to remember.

  • You specify a port number with a comma, not the standard colon: dbserver,1434
  • char fields return with padded spaces…

I imagine I’ll add to this list as I find other things.

Published
Categorized as Uncategorized Tagged

2 comments

  1. DB2 also pads char fields with blanks so you see the idiom RTRIM(INST.FIELD) FIELD all the time. Tedious…

    But sql server mgmt studio is so much better than the one that comes with the DB2 Connect Client package – at least for daily tasks.

  2. I get rid of the padded spaces in my hibernate classes… at least when using java. You can do something similar with db2 as long as you’re using hibernate’s ORM. Otherwise, you can add a utility function as you iterate through the ResultSet (rather than dirty up your SQL).

    The important thing to note with hibernate is that you have to do a String.trim() call in the getter method — doing a trim in the setter method makes hibernate think that the object is always dirty, thus always needing an UPDATE call to the database.

Comments are closed.