|
|
|
|
|
|
|
| Question of the Day |
Today's question (by aniap): | |
ORDER BY alias | |
There is a table tmp_tab:
CREATE TABLE tmp_tab ( id int, val int ); INSERT INTO tmp_tab VALUES (1, 1), (2, NULL), (3, 3), (4, 4), (5, 5);You want to order the rows ids by the following expression: ISNULL(val, id) + 1Which of the following queries produces the expected ordering and why? (Select all correct) | |
Think you know the answer? Click here, and find out if you are right. | |
| Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
Squared Values What happens when I run this code in SQL Server 2022? SELECT SQUARE('12')Answer: 144 Explanation: This returns 144. Square takes a float parameter, but will handle any value that implicitly converts to float. Ref: SQUARE() - https://learn.microsoft.com/en-us/sql/t-sql/functions/square-transact-sql?view=sql-server-ver17 |
| Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
| SQL Server 2019 - Administration |
| How do I connect to a SQL Server database on my ISP? - I've got a web application for my side business. I've added a SQL Server 2019 database to it. Now, I'm trying to connect to it using SSMS 20.2 and also Visual Studio Code. I've been following the instructions they have here which seems straight forward to me. The error I'm getting from Visual Studio Code […] |
| SQL Server 2019 - Development |
| advice on ssrs version control - Hi we're a bit behind on versioning ssrs. I think we have over 1600 reports, 65 data sources and over 700 folders on our main sql server. And a smaller amount on a separate sql server in one of our plants. for some reason we also keep xls (over 400) , pdf's (over 3,000) […] |
| Editorials |
| The Costs of Multiple Platforms - Comments posted to this topic are about the item The Costs of Multiple Platforms |
| Looking for New Blood - Comments posted to this topic are about the item Looking for New Blood |
| The End of Summer - Comments posted to this topic are about the item The End of Summer |
| Measuring Productivity - Comments posted to this topic are about the item Measuring Productivity |
| Article Discussions by Author |
| Stored Procedures for Server-Level Object and Column Search - Comments posted to this topic are about the item Stored Procedures for Server-Level Object and Column Search |
| Databricks Genie Spaces for SQL Analysts: Natural Language Querying Without Leaving Your Data Platform - Comments posted to this topic are about the item Databricks Genie Spaces for SQL Analysts: Natural Language Querying Without Leaving Your Data Platform |
| RegEx Functions II - Comments posted to this topic are about the item RegEx Functions II |
| Adding new column with DEFAULT - Comments posted to this topic are about the item Adding new column with DEFAULT |
| Server-Level Row Counts for Tables and Views - Comments posted to this topic are about the item Server-Level Row Counts for Tables and Views |
| Hyperscale Replicas I - Comments posted to this topic are about the item Hyperscale Replicas I |
| Parameter Sensitive Plan Optimization vs. Parameter Sniffing: What SQL Server Fixes and What It Doesn't - Comments posted to this topic are about the item Parameter Sensitive Plan Optimization vs. Parameter Sniffing: What SQL Server Fixes and What It Doesn't |
| Importing Excel files into SQL Server using DuckDB and Python - Comments posted to this topic are about the item Importing Excel files into SQL Server using DuckDB and Python |
| SQL Server 2022 - Administration |
| Performance Regression After Upgrading from SQL Server 2016 to 2022 - Bonjour à tous, La semaine dernière, nous avons effectué une mise à niveau de notre instance SQL Server, en passant de SQL Server 2016 à SQL Server 2022. Au début, tout s'est bien passé et nous avons défini le niveau de compatibilité de la base de données à 160 comme recommandé. Cependant, peu après la […] |
| |
| ©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |