Tag: blogging

  • Posting Data and Code–#SQLNewBlogger

    Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. Here are some hints to get started.

    I wrote a SQL New Blogger post recently on running totals and used some images to show data. A reader sent me a note to say it would be nice to see the code that helps put the post together. I thought that was a good suggestion, so that’s this post.

    How can you add code and data to your post?

    Publishing Code

    There are a number of ways to add code to a blog post. Some of the platforms have specific plugins to handle different types of code. There are also some plugins in Open Live Writer, which I use, for code.

    I’ve stopped using those.

    It’s simpler to me to just use the PRE tag, for selecting preformatting for a set of code. I use WordPress here, and when I added the code used in this post, I highlighted the code and then selected the Preformatted style. This is shown below.

    2022-05-03 09_27_25-Edit Post “A Monthly Running Total–#SQLNewBlogger” ‹ Voice of the DBA — WordPres

    The PRE tag works well for me and it’s simple. If you want to spend the time configuring code for colors specific to your language, feel free, but I am less concerned about that.

    Generating CREATE Statements

    For most demo set ups, I create a new table and I copy the code over. For example, I was doing some DDM testing and I made this table.

    2022-05-03 10_49_09-SQLQuery1.sql - ARISTOTLE_SQL2017.sandbox (ARISTOTLE_Steve (55))_ - Microsoft SQ

    To add that to this post, I’d CTRL+A to select all the code and then copy it. I can paste it below and then format with the PRE tag.

    CREATE TABLE [dbo].[DDMEmailTest](
         [MyID] [int] IDENTITY(1,1) NOT NULL  CONSTRAINT [DDMEmailTestPK] PRIMARY KEY ,
         [MyName] [varchar](100) NULL,
         [Email] [varchar](100) MASKED WITH (FUNCTION = 'email()') NULL,
         [Salary] [int] NULL,
    GO

    In LiveWriter there isn’t a PRE tag, so I just quickly edit the source and add a “re” to the paragraph tags. You can see where I’ve added PRE below, highlighted by the arrow:

    2022-05-03 10_50_04-Posting Data and Code–#SQLNewBlogger - Open Live Writer

    The other option is to script the table to the Clipboard. I can do this in SSMS easily.

    2022-05-03 10_55_23-SQLQuery2.sql - ARISTOTLE_SQL2017.sandbox (ARISTOTLE_Steve (66))_ - Microsoft SQ

    I then paste the code into Live Writer.

    Note, I usually edit out the USE and SET statements.

    Adding INSERT Statements

    After the DDL for tables is around, the next important thing for readers is data. If you have the INSERT statements from your testing, then use those. As above, paste those in here.

    If not, there are a few options. I have SQL Prompt, so I can select from the table, highlight the results, and then “script as insert”.

    2022-05-03 10_57_38-SQLQuery2.sql - ARISTOTLE_SQL2017.sandbox (ARISTOTLE_Steve (66))_ - Microsoft SQ

    The other option is to “build” an insert statement like this:

    SELECT TOP 10
            '(''' + CAST(spt.ProductionDate AS VARCHAR(10)) + ''', ' +
           + CAST(spt.Actual AS VARCHAR(10)) + ', '
           + CAST(spt.Estimate AS VARCHAR(10)) + ')'
    FROM dbo.SolarPowerTracker AS spt;

    I can wrap the INSERT tablename VALUES in front of this and then paste this into the post.

    SQL New Blogger

    Not really a technical post, but this does show a little technical skill. Writing about how you solve problems or build on other posts is a good way to show you have some varied skills that an employer might like.

    This post took me about 15 minutes to write.

  • Boost Your Career with #SQLNewBlogger

    A few years ago Ed Leighton-Dick started the #SQLNewBlogger challenge. He asked people to start writing about their career and building their own brand. I thought it was a great idea and I’ve been continuing the challenge on my own blog, writing posts and also including a short note on the effort for me to produce posts.

    It’s early 2022, and if you haven’t been blogging, and you want to grow your career, start writing. Set up a blog and produce some posts. You will build communication skills, you will showcase your knowledge, and provide potential employers with some due diligence about why you would be a good addition to their team.

    Think about tagging these posts with #SQLNewBlogger as well. You’ll promote these alongside other people’s posts and perhaps will find yourself a new, better position this year.

  • Blogging for the Tech Professional

    Abstract:

    When a company posts a job opening, they are often inundated with dozens, if not hundreds, of applicants. How do they decide which ones are worth pursuing with an interview? Standing out from other candidates is important to ensure you receive the consideration that you deserve. Building a blog and including those links in your CV can help. Come learn how to build a blog, choose topics, and share your knowledge in a way that boosts your career.

    Length: 60 minutes

    Slides: (from DPS 2020)  blogging_DPS.pptx

  • Less Blogs

    I’m going to blog a bit less here this year. As I evaluate my goals and life,  I feel a bit overloaded right now. I have lots of ideas, and lots of things to write about, but I need to focus a bit on some other tasks, and I don’t need to publish here 4-5 times a week, which is what I’ve done.

    As I’ve told others, if you’re changing your blog, make a note. If you stop blogging, write a post. This is that post.

    I will try to publish 2-3 times a week, some Redgate content, some SQLNewBlogger, some interesting things I see, but I’ll spread the content out more.

    I’ll re-evaluate in a few months. At that time I’ll stop coaching for the season, and perhaps life will be a bit different.