sql-server-2014

SQL how to split Quantity into Multiple Rows based on Quantity on Target source

一个人想着一个人 提交于 2019-12-01 19:14:04
问题 I have two table where i want to join and show quantity with details. table are join with ITM,DIA , and total Qty is equal in both table on ITM/DIA combination I want to split table2 quantity on table1 and populate table2 data along with table1 data. I have below data for your reference, "table1" and "table2". and you can see my expected result in table "tableResult" CREATE TABLE table1 (`ITM` varchar(5), `DIA` varchar(4), `LOC` varchar(4), `ID` varchar(3), `QTY` int) ; INSERT INTO table1 (

VS 2015 Native compiler return value -1073741511 on .rdlc files when building project

烂漫一生 提交于 2019-12-01 17:32:01
I got this error: rsUnexpectedCompilerError: An unexpected error occurred while compiling expressions. Native compiler return value: ‘-1073741511’ ,when compiling rdlc 's on a new box on Visual Studio 2015 on a Windows 8.1 box for an existing project This happens on every existing r d lc file in the project that has an expression . I checked that. I have the latest sql server data tools (ssdt) installed. I also created a brand new console application with empty report with no expressions and it compiles fine. When I add an expression to that empty report, like in the example below, it refuses

Installing DotNetNuke : Database Connection Failing

北战南征 提交于 2019-12-01 14:43:32
I am trying to setup DNN on my local machine but having following error. Installing DotNetNuke Upgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider I have a SQL Server 2014 Express installed with custom login created. I can login and access to database with same credentials using SQL Management Studio. In web.config file, I have following lines for Database connection: <connectionStrings> <add name="SiteSqlServer" connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=<dbName>;User ID=<UID>;Password=<PWD>" providerName="System.Data.SqlClient

Multiple conditional Where clause

左心房为你撑大大i 提交于 2019-12-01 13:27:53
I currently have a query that will pull a bunch of information from my database based on whatever where condition that I want to use. declare @CaseNum char(7), @ImportId char, @FormatId char, @SessionId char(5) set @CaseNum = '' --I can place the value that I want to search by in here set @ImportId = '' set @FormatId = '' set @SessionId = '' -------------------- query in here -------------------- where gr.[CaseNum] = @CaseNum --currently I have to comment the ones I'm not using out --im.[ImportId] = @ImportId --fr.[FormatId] = @FormatId --se.[SessionId] = @SessionId I want to be able to take

Installing DotNetNuke : Database Connection Failing

旧巷老猫 提交于 2019-12-01 13:27:50
问题 I am trying to setup DNN on my local machine but having following error. Installing DotNetNuke Upgrade Error: ERROR: Could not connect to database specified in connectionString for SqlDataProvider I have a SQL Server 2014 Express installed with custom login created. I can login and access to database with same credentials using SQL Management Studio. In web.config file, I have following lines for Database connection: <connectionStrings> <add name="SiteSqlServer" connectionString="Data Source=

Multiple conditional Where clause

泪湿孤枕 提交于 2019-12-01 11:00:00
问题 I currently have a query that will pull a bunch of information from my database based on whatever where condition that I want to use. declare @CaseNum char(7), @ImportId char, @FormatId char, @SessionId char(5) set @CaseNum = '' --I can place the value that I want to search by in here set @ImportId = '' set @FormatId = '' set @SessionId = '' -------------------- query in here -------------------- where gr.[CaseNum] = @CaseNum --currently I have to comment the ones I'm not using out --im.

Dynamically select distinct current and previous columns from a sql table

自作多情 提交于 2019-12-01 08:29:16
I have a temporary table like so Id |Name |Status | Rate | Method |ModifiedTime |ModifiedBy ----------------------------------------------------------------------------- 1 |Recipe1 | 0 | 30 | xyz | 2016-07-26 14:55:57.977 | A ------------------------------------------------------------------------------- 2 |Recipe1 | 0 | 30 | abc | 2016-07-26 14:56:18.123 | A -------------------------------------------------------------------------------- 3 |Recipe1 | 1 | 30 | xyz | 2016-07-26 14:57:50.180 | b I would like to select only the changes and wanted to show what the value was previously and what it

Dynamically select distinct current and previous columns from a sql table

一笑奈何 提交于 2019-12-01 07:26:02
问题 I have a temporary table like so Id |Name |Status | Rate | Method |ModifiedTime |ModifiedBy ----------------------------------------------------------------------------- 1 |Recipe1 | 0 | 30 | xyz | 2016-07-26 14:55:57.977 | A ------------------------------------------------------------------------------- 2 |Recipe1 | 0 | 30 | abc | 2016-07-26 14:56:18.123 | A -------------------------------------------------------------------------------- 3 |Recipe1 | 1 | 30 | xyz | 2016-07-26 14:57:50.180 |

Distributed database transaction vs cross database transaction

不羁岁月 提交于 2019-12-01 01:51:51
问题 What's the different between Distributed database transaction and cross database transaction in SQL Server. I know that Distribute database transaction is a transaction between multiple database and can use by following query : BEGIN DISTRIBUTED TRANSACTION ... COMMIT TRANSACTION 回答1: A Cross database transaction occurs between 2 or more databases on the same server. It does not require the involvement of a DTC (Distributed Transaction Coordinator) A Distributed database transaction occurs

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

情到浓时终转凉″ 提交于 2019-11-30 19:20:12
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 Update[19/June/18] : Today one of my colleagues faced this very same issue with SQL Server 2017 setup installer as well. 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