Laden...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Collins): | |
Case expression with NULL | |
You run this SQL Server code select case when 1=0 then null end; What does the query return? | |
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) |
More ANSI_PADDING Tables I run this code to create a table and insert rows. What are the results that I see from the query? SET ANSI_PADDING OFF GO CREATE TABLE dbo.ANSIPADDINGOFF(charcol CHAR(20), varcharcol VARCHAR(20)) GO INSERT dbo.ANSIPADDINGOFF (charcol, varcharcol) VALUES ('c test2','v test2 ') GO SELECT '[' + a.charcol + ']', '[' + a.varcharcol + ']' FROM dbo.ANSIPADDINGOFF AS a GOAnswer: [c test] and [v test] Explanation: When ANSI_PADDING is off, and the columns are nullable, both fixed and variable character strings do not have trailing blanks. Ref: SET ANSI_PADDING - https://learn.microsoft.com/en-us/sql/t-sql/statements/set-ansi-padding-transact-sql?view=sql-server-ver16 |
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 2017 - Administration |
Troubles with in memory OLTP performance degradation - I started with a new company recently and they use in memory OLTP which is something I haven't used before so I'm excited to try a new technology. I've been there about a month now and I'm reading/watching everything I can on the feature but they're seeing some strange behavior that I could use some […] |
SQL Server 2016 - Administration |
Job History says running, but Job Activity says idle - Hello experts, I'm hoping to get help with a strange issue. I got a request to stop a long-running SQL Agent job. The client correctly sees that the job history says the job is running. But when I checked the Job Activity Monitor, it says the job is idle and last succeeded at such-and-such a […] |
SQL 2012 - General |
60 Second Rolling Avg With Different Starting Points - Hi, I have a table with columns: jobId, timeStamp (for duration per jobId) and tempData (see attachment). I have created a query that calculates 60 second rolling average by jobId. (you can see it at the end of the post) Where I am struggling is adding two additional rolling averages. Both of them would be […] |
SQL Server 2019 - Administration |
SQL Server (Express) installation issue - Please be gentle.. newbie here ! I'm creating an install program (Using Advanced Installer, but I don't think that's relevant) to install SQL Express. I'm trying to do this as a quiet install with no user intervention. It's failing with a request for a password on the SQL Server Browser. I cant see how to […] |
SQL Server 2019 or 2022 - Hi Experts, We are planning to upgrade our SQL Servers from 2014 to higher version.Which is the best suitable upgrade 2019 or 2022, please advise. Regards |
SQL Server 2019 - Development |
Existing scalar function within a trigger is not found - Calling an existing scalar function within a trigger which is not found within the trigger (Msg 4121, Level 16, State 1) The error is the following: Msg 4121, Level 16, State 1, Procedure Sales.uTu_Customer, Line 12 [Batch Start Line 44] Cannot find either column "Hashing" or the user-defined function or aggregate "Hashing.CreateJsonInputForSha256SalesCustomer", or the name […] |
Column name with text and column name - Hello all. I hope everyone's ok I have this query: SELECT cont, type, month01, month02, month03... FROM acum Where year=2022 I'd like that for each month it shows a text and the year, like Jan-2022, Feb-2022 and so on. Something like SELECT cont, type, month01 AS CONCAT( 'Jan-',year) , month02 AS CONCAT( 'Feb-',year) ... FROM […] |
Stored procedure for top 1 from multiple tables and update 1 table in 1 query - I have two tables in this format below; Table Transfer Id Stage Amount TransactionNumber bnumber Table User Id Bnumber FirstName FirstLastName My aim is to select top 1 from these tables based on criteria and then update that record in the Transfer table, all in one query. I have struggled and came up with the […] |
General Cloud Computing Questions |
Suggest cloud provider for SQL - I am a MERN stack developer and we need to work with SQL for a project. Can anyone suggest a good FREE cloud SQL server having low storage with which my Node backend can connect using an URI (Like Atlas for MongoDB). Our backend developer is left in the dark with this sudden and urgent […] |
Azure Data Factory |
Data factory question - Upon my adventures of Azure data factory and all the wonders it can do I have stumbled upon a issue that Microsoft support has no answer as of yet. Long story short, I am trying to ingest data from a storage blob in another tenant. That customer will only allow us to connect to that […] |
Reporting Services |
Behaviour of a link in a report in ReportViewer - Hi. I have an issue with a report that is about 10 years old. The report is running on an ASP.net application that is running off IIS and SQL Server 2017 on a Windows Server 2018 Server machine. The Asp.net application has a Report viewer control to view reports. There are links in the report […] |
SSRS 2014 |
Out of memory (error code) - hi I have a problem. I have created a report which shows the data from table in SQL Server (just a "select * from where catid in (..)). There is a parameter where I can choose if it should show MAIN categories, OTHER categories or ALL categories - and depend on choose - the list […] |
Out of memory (error code) - hi I have a problem. I have created a report which shows the data from table in SQL Server (just a "select * from where catid in (..)). There is a parameter where I can choose if it should show MAIN categories, OTHER categories or ALL categories - and depend on choose - the list […] |
SQL Server 2005 Integration Services |
SSIS Connection Manager OLEDB Issue - Hi Team, this is first time I am posting question on forum, I am able to connect to DB using SSMS and windows authentication, however when I am trying to connect in SSIS for new OLEDB connection it seems to give me error as below. Test Connection failed because of an error in initializing provider. […] |
SQL Server 2022 - Development |
Distance between multiple locations - What would be the best approach when establishing the distance between points. By that I mean I have lets say 2 fixed Building locations and 8 moving Cranes(Container lifting Crane). I have position locations every minute of the cranes, for all 8 of them. I can establish the distance with the Haversine formula in an […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024