sql-server-2014

(Unfixable) Assembly exists on SQL Server 2014 but it claims it doesn't have it

安稳与你 提交于 2019-12-20 04:04:06
问题 Update: this problem is not fixable: https://connect.microsoft.com/SQLServer/Feedback/Details/809697 I'm attempting to create a SQL CLR assembly with .net 4.5 and it's telling me it's missing system.servicemodel (even though it's in the .net assembly folders): Assembly 'MySQLCLRProject' references assembly 'system.servicemodel, version=4.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089.', which is not present in the current database. SQL Server attempted to locate and automatically

Ledger Report Logic in Stored Procedure

☆樱花仙子☆ 提交于 2019-12-20 03:17:53
问题 i have a Stored Procedure called "Patient Ledger Report" where i need to show the day to day transaction details and balance amount of the patients.i was providing you one sampled data from below code how the data was inserting into my temporary table in my sp. create table #Patient_ledger (PATIENT_NAME varchar(250),PATIENT_NBR bigint,BILLNO varchar(250),BILLAMOUNT bigint, PAID_AMOUNT bigint) Insert into #Patient_ledger (Patient_name ,Patient_nbr ,billno ,billamount , paid_amount ) select

Latest SSDT vs. SqlPackage incompatibility for SQL Server 2014

ぃ、小莉子 提交于 2019-12-20 01:07:18
问题 One of our build servers has just been updated to the latest "Microsoft SQL Server Update for database tooling" (version 12.0.60629.0) and is now incompatible with the version of SqlPackage.exe we have (in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\120\SqlPackage.exe). The SQL Server database project (targeting SQL Server 2014) builds without error, but when we attempt to deploy the .dacpac to the target server using SqlPackage.exe, we get

SQL Server service doesn't start anymore automatically if I make a Windows restart

♀尐吖头ヾ 提交于 2019-12-19 12:52:18
问题 I have Windows 10 build 1511, where I have installed SQL Server 2014. After installation everything is OK. I've made several times shutdown on Windows 10, and after if I turn on my PC everything is OK. But if I restart the system, after the restart, the SQL Server service remains stopped (startup type is Automatic ). I try another restart and shutdown, but the service doesn't start automatically anymore. I've started the service manually, and after the service is started and everything works

Using SQL concatenation with ORDER BY

混江龙づ霸主 提交于 2019-12-19 03:21:52
问题 I'm confused. How could you explain this diffenece in variable concatenation with ORDER BY? declare @tbl table (id int); insert into @tbl values (1), (2), (3); declare @msg1 varchar(100) = '', @msg2 varchar(100) = '', @msg3 varchar(100) = '', @msg4 varchar(100) = ''; select @msg1 = @msg1 + cast(id as varchar) from @tbl order by id; select @msg2 = @msg2 + cast(id as varchar) from @tbl order by id+id; select @msg3 = @msg3 + cast(id as varchar) from @tbl order by id+id desc; select TOP(100)

SQL Server 2014 installation stuck (hung up) or taking very long time to finish

半腔热情 提交于 2019-12-18 19:23:07
问题 I'm trying to install SQL Server 2014 but it stays in the same spot (Install_VCRuntime_Cpu32_Action) for hours. It's already the third time I'm trying to install so I don't know what else to do. SQL Server 2014 Installation 回答1: I observed this very same issue in one of my colleague's windows 10 box with SQL Server 2014 Enterprise installer as well. As mentioned in this MS connect bug you can try either of the below mentioned options: As mentioned by KevinMS in comments tab : I used task

SQL Server 2014 installation stuck (hung up) or taking very long time to finish

為{幸葍}努か 提交于 2019-12-18 19:22:20
问题 I'm trying to install SQL Server 2014 but it stays in the same spot (Install_VCRuntime_Cpu32_Action) for hours. It's already the third time I'm trying to install so I don't know what else to do. SQL Server 2014 Installation 回答1: I observed this very same issue in one of my colleague's windows 10 box with SQL Server 2014 Enterprise installer as well. As mentioned in this MS connect bug you can try either of the below mentioned options: As mentioned by KevinMS in comments tab : I used task

Grouping and counting rows by value until it changes

落爺英雄遲暮 提交于 2019-12-18 13:29:04
问题 I have a table where messages are stored as they happen. Usually there is a message 'A' and sometimes the A's are separated by a single message 'B'. Now I want to group the values so I'm able to analyze them, for example finding longest 'A'-streak or distribution of 'A'-streaks. I already tried a COUNT-OVER query but that keeps on counting for each message. SELECT message, COUNT(*) OVER (ORDER BY Timestamp RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) This is my example data: Timestamp

Set based plan runs slower than scalar valued function with many conditions

萝らか妹 提交于 2019-12-18 07:00:11
问题 This question is a bit more of a hypothetical than an actual code problem. But I have provided a dumbed down version of the code to illustrate the question. Please no comments about the silliness of the code itself. The actual code is too complicated (and proprietary) so this is the best way to proceed. I have a scalar valued function as follows. CREATE FUNCTION [dbo].[Compute_value] ( @alpha FLOAT, @bravo FLOAT, @charle FLOAT, @delta FLOAT ) RETURNS FLOAT AS BEGIN IF @alpha IS NULL OR @alpha

Could not find server 'server name' in sys.servers. SQL Server 2014

人盡茶涼 提交于 2019-12-18 05:41:53
问题 I recently upgraded our SQL Server from 2005 to 2014 (linked server) and I am noticing that one of the stored procedures which calls the exec command to execute a stored procedure on the upgraded linked server is failing with the error Could not find server 'server name' in sys.servers.Verify that the correct server name was specified. If necessary, execute the stored procedure sp_addlinkedserver to add the server to sys.servers. The issue is that the linked server exists and I have done