Tag: Redgate

  • Quick Tips – SQL Prompt Stop the Yelling

    I love SQL Prompt, and think it’s a great productivity tool. Even before I worked at Red Gate, I love the tool and had a copy before Red Gate bought the technology from the original developer. Recently I’ve run into a few people that weren’t aware of some of the ways in which it can help you. This is a quick look at one of the ways I use SQL Prompt.

    Lower Case Keywords

    One of the things that many developers like is lower case keywords. If you examine some C# code, you’ll often find that they have keywords in lower case. For example, here’s a sample from MSDN.

    // versioning.cs
    // CS0114 expected
    public class MyBase 
    {
       public virtual string Meth1() 
       {
          return "MyBase-Meth1";
       }
       public virtual string Meth2() 
       {
          return "MyBase-Meth2";
       }
       public virtual string Meth3() 
       {
          return "MyBase-Meth3";
       }
    }

    When I’ve gotten projects from Red Gate, I see something similar.

    However, if I enter some code in Management Studio, by default, SQL Prompt will format it like this:

    prompt_aa

    Notice the upper case keywords. Personally I like these, but many developers may not. Fortunately there’s an easy fix. Access the SQL Prompt menu in Management Studio and select options (circled below).

    prompt_ab

    This will bring up the options dialog. Select the CASE item as shown below.

    prompt_ac

    On the upper right side, you’ll notice that you have drop downs for keywords, built-in functions and data types. By default these are all set to uppercase. However you have a number of choices.

    prompt_ad

    I’ll change mine to lowercase, click OK, and then reformat my code. I now see this.

    prompt_ae

    Quick and easy, and I can now read code that looks more like what developers are used to. Maybe I’ll leave things set like this…

    You can see a complete list of SQL Prompt tips at Redgate.

  • Quick Tips–SQL Prompt Formatting

    I love SQL Prompt, and think it’s a great productivity tool. Even before I worked at Red Gate, I love the tool and had a copy before Red Gate bought the technology from the original developer. Recently I’ve run into a few people that weren’t aware of some of the ways in which it can help you. This is a quick look at one of the ways I use SQL Prompt.

    Ugly Code

    It’s often that I’ll get code submitted at SQLServerCentral, or it will come in a demo from Red Gate, and it will look something like this:

    prompt_af

    This is actually code from Microsoft in the AdventureWorks 2008 sample database. It’s ugly and hard to read. In fact, I struggle trying to interpret code when I see it like this.

    Reformatting

    One of the things I probably do most often, after SSF, is reformat code so that I can read it. I have a few settings I prefer, but to apply them, I’ll click CTRL+K, then CTRL+Y and my code will get fixed.

    prompt_ag

    If I have invalid SQL, Prompt will throw an error and there will be a squiggle line under the offending sections. If I only want to reformat a portion of code, I can highlight it before hitting the shortcut.

  • Telepresence

    I remember seeing the telepresense robot on The Big Bang Theory and thinking it was somewhat silly, and not a great substitute for a live person. The whole episode was a bit humorous and funny, with Sheldon attempting to prevent himself from befalling any harm by using the robot to substitute for him at work.

    It’s amazing how your view of the world can change in a few years. The past three years have had me traveling 15+ times a year to various events to deliver presentations on a variety of topics. However I’m cancelling all future talks in 2014, at least for live travel.

    The VGo telepresence robot has been offered to Red Gate on a trial basis for us to test it in a number of ways. We are looking to use this robot to allow us to reach more users and deliver more talks as well as perform consulting for some of our customers. We have worked with VGo to not only allow a broadcast presence of myself or a developer from Red Gate, but we have built a turnkey demonstration system.

    With a custom shipping container holding the VGo and a Gigbyte BRIX mounted on it, anyone can easily unpack the robot in minute, unfolding it in a room, plug it into power, a microphone, and a video projector. It will automatically power up and log onto the Verizon network, where I can connect to it from home and reconfigure it for local networking. I can not only control the robot and address an audience (as well as hear them), I can also control the various VMs on the BRIX and demonstrate any SQL Server setup that suits the talk.

    As you might guess, this will allow me to broadcast to SQL Saturday events every week as well as attend many other conferences. If things work well, Red Gate is looking to deploy a few of these for not only presentations, but also for consulting in helping our customers use our tools to build robust software delivery piplines. We can ship one to a customer and then work with them in a remote situation.

    I’ve very excited about the entire pilot, mostly because it’s a joke on April 1. For now. Perhaps we’ll give this a try at some point.

    Steve Jones

    The Voice of the DBA Podcast
    Listen to the MP3 Audio ( 2.9MB) podcast or subscribe to the feed at iTunes and  Mevio . feed

    The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music. Support this great duo at www.everydayjones.com.

  • All in Fun

    My first commercial!

    Steve on a Horse

    This comes from our DBA Team promotion, which is ongoing this year.