r/SQLServer • • Nov 17 '16

[AMA] Microsoft SQL Server - 11/18

Hi Everyone!  

We're from the Microsoft SQL Server Engineering Team and we want you to ask us anything!  

We're posting this a bit early so you can start asking questions - feel free to start asking and we'll start answering Friday 11/18 at 9:30 PDT until 14:00 PDT. We'll have members from the Engineering teams participating in the AMA. This includes folks working on

  • SQL Server Features such as Columnstore, In-Memory OLTP, Row-Level Security, PolyBase, Stretch, or any of the features listed here.

  • Database Tools for Microsoft SQL Server and Azure SQL Database (SSMS, SSDT, SSRS, SSIS, SSAS, SSMA, SQLPS, CLI Tools)

  • Azure Portal for Azure SQL DB, Azure Elastic Database Pools or Azure Virtual Machines with SQL Server

  • R Services for predictive analytics, machine learning, and using scalable R packages with SQL Server technologies

  • Developing with SQL Server using the language of your choice (Examples. Node, Python, Java, etc.) or connecting your app to SQL Server using our drivers (ODBC, JDBC and open source drivers)

  • Migrating or Building Apps and Solutions with SQL Server and the resources we have available to help you get the most out of SQL Server.

  • [SQL Server on Linux] (https://www.microsoft.com/en-us/sql-server/sql-server-vnext-including-Linux)

  • [SQL Server 2016 Service Pack 1] (https://blogs.technet.microsoft.com/dataplatforminsider/2016/11/16/sql-server-2016-service-pack-1-generally-available/)

Here are some question ideas:

  • What’s new in SQL Server Service Pack 1 and SQL Server on Linux?

  • How does your team take the feedback from the community?

  • What tools would I use to migrate my database to SQL Server?

  • What’s a cool trick you don’t think most customers know about?

You can ask us anything about our public products or about the team. If there's a topic that's not listed above, ask it anyways! We'll do our best to answer it. We cannot comment on unreleased features and future plans, though :) Tweet at us with #SQLServer and follow @SQLServer to keep up to speed with what the SQL team is working on. After this AMA, you can also post questions here in reddit or tweet at us any time.

    Update@9:50 PST Hey Everyone! We are starting to answer the questions! Thanks for all the awesome questions so far. keep them coming! :)

    Update@2:15 PST Hey Everyone! Wow. Over 100 questions. Thanks for joining us today and participating in our SQL Server AMA! We're currently wrapping up the AMA, but we will do our best to answer the remaining questions. Going forward, the SQL Server Team will be more active on this subreddit. We're particularly excited to hear what you have to say about SQL Server v.Next!  

Also, tell us what you thought about this AMA Event by taking our survey: https://survey.microsoft.com/211438

67 Upvotes

386 comments sorted by

View all comments

Show parent comments

3

u/MaunaLoona Nov 18 '16

TOP() OVER operator - like SELECT TOP (3) OVER (PARTITION BY custid ORDER BY orderdate, orderid)

This one's at the top of my list. Would save me so much time as it would no longer require a CTE.

2

u/sbrick89 Nov 18 '16

couldn't this be done with the simplest of subselects?

select * from (
  select *, rowcount over partition by custid order by date, orderid
) a
where a.rowcount <= 3

?

1

u/MaunaLoona Nov 18 '16

Now imagine there's a few joins in there and several columns have the same names, so you can't do SELECT * in the subquery any more.

1

u/sbrick89 Nov 18 '16

so your concern is laziness? Also, reusing the column names would ALWAYS be discouraged, as it increases the chances of causing huge issues for app code (if it references the column by name instead of ordinal, as a ton of code does)

3

u/MaunaLoona Nov 18 '16

so your concern is laziness?

I suppose in your eyes the people who choose to code in C++ instead of typing out machine code as 1s and 0s are simply 'lazy' too.

Also, reusing the column names would ALWAYS be discouraged, as it increases the chances of causing huge issues for app code (if it references the column by name instead of ordinal, as a ton of code does)

I said in the subquery.