Tag: syndicated

  • Implicit Time Conversions – #SQLNewBlogger

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

    I was trying to work with times recently and needed to get the current time. I thought, well, Getdate(), or better yet, SysDateTime() will give me a date and time, but what about the time?

    A simple experiment showed it’s easy:

    DECLARE
        @t TIME,
        @t1 TIME;
    SELECT @t = SYSDATETIME(), @t1 = GETDATE();
    SELECT @t, @t1;

    I got this:

    2017-02-24 12_34_19-SQLQuery2.sql - (local)_SQL2016.PartsUnlimited_Grant (PLATO_Steve (59))_ - Micro

    Quick, easy, and what I suspected would work. If you need to work with times, you can easily cast a datetime value to a TIME to strip the date, or just assign the values to a time.

    CREATE TABLE TimeTest
    (t TIME)
    GO
    INSERT TimeTest
    SELECT top 10
     CreationDate
     FROM dbo.Posts
     GO
     SELECT top 10
      *
      FROM dbo.TimeTest
    GO
    DROP TABLE TimeTest

    This code takes a datetime column and just inserts the time into the new table.

    SQLNewBlogger

    Literally about 3 minutes of my day to write this. When you learn something, write it down.

  • How Do You Use SQL Clone?

    On Monday, Redgate released v1.0 of SQL Clone, and I’m excited that the product is finally available. I’m excited because this has been a long time coming, but it’s worth the wait.

    You can certainly download SQL Clone and try it out, but I’d also say you should check out this virtual tour to see how the product works. It makes sense to me, but I’ve been testing it for months.

    I’ve also written a few pieces about how SQL Clone plays with TDE (part 1 and part 2), and there’s plenty more at the SQL Clone site. Check it out today and see how you can easily build dev/test environments, at full size, without using all the disk space.

  • TSQLTuesday.com

    I’ve hosted a page on this blog that has all the T-SQL Tuesday blog invitations and roundups linked. I did this mainly because I was trying to ensure I have hosted a few, I wanted to know what others had chosen. Since I didn’t see a good list, I created one.

    And I’ve maintained it, which seems crazy since it’s been 6+ years.

    Recently on a Twitter conversation someone suggested getting a central site, using a real domain. I thought that was a good idea, since my page isn’t necessarily the most intuitive item to find.

    Somehow I ended up getting a domain transfer from Brent Ozar and getting talked into hosting the site. It’s live, now at:

    TSQLTuesday.com

    I did this with a simple Azure website, using WordPress. That’s another story, and I should blog about it, but for now, the site is live and running there. I’ve added Adam and Brent as administrators, so they can help maintain things.

    I’m also open to suggestions on how to better organize things. I’d like to get a page for each entry, but we’ll have to see how that works.

  • Speaking at VS Live–Austin

    I’ll be speaking at Visual Studio Live – Austin in May 2017. I was fortunate to be selected to speak again, after my first two VS Lives last year in DC and Orlando. I’m excited to go back, as the conference is a lot of fun, and Austin is a great town.

    auspk14

    I have two sessions, Continuous Integration for Databases and A Tour of SQL Server 2016 Security Features. I’ve given similar sessions in the past, but I’m revamping the talks for this year, updating them and adding some new demos.

    When I went to the conference(s) last year, I really enjoyed my time there. I had the chance to see some great SQL and Visual Studio sessions. With the upcoming release of VS 2017, and SQL Server v.Next, this is a good time to think about a spring conference.

    Plus the margaritas and Tex-Mex in Austin is fantastic.

    Hope to see you there if you want a learning opportunity this May. Register and use my code, AUSPK14 to save some money as well.