sql-server-2012

Visual Studio SQL Server design and inline editing features missing

左心房为你撑大大i 提交于 2019-12-10 13:50:56
问题 In Visual Studio 2012 I have two database connections configured in the Server Explorer. One is for a SQL Server 2008 R2 database, the other is for a SQL Server 2012 database. I've always been able to make quick inline edits to the data with SQL 2008 databases by right clicking on the table and selecting "Show Table Data". I could then pop open the SQL pane and query the data, put a cursor directly in the field and edit the data in the result set. I relied on this method heavily when making

How do I run an SSIS package in SqlServer 2012 using vs2010?

感情迁移 提交于 2019-12-10 13:38:26
问题 Setup I have a vs2010 SSIS package that I can run from visual studio. I have deployed it to my local 2012 server, and I can also execute that package from SSMS. In SSMS, I see the package here: \Integration Services Catalogs\SSISDB\DAT_Load\Projects\UploadSYS.dtsx Note: vs2010 does not give me an option to deploy a package anywhere but in a server, and then only in Integration Services Catalogs. Once in there, the MSDB database does not have an entry in the sysssispackages table. Previously,

SSAS cube processing error about column binding

白昼怎懂夜的黑 提交于 2019-12-10 13:36:44
问题 This is an error message I get after processing an SSIS Cube Errors in the back-end database access module. The size specified for a binding was too small, resulting in one or more column values being truncated. However, it gives me no indication of what column binding is too small. How do I debug this? 回答1: Open your SSAS database using SQL Server Data Tools. Open the Data Source View of the SSAS database. Right click an empty space and click Refresh A window will open and show all changes

escape square brackets in PATINDEX with SQL Server

為{幸葍}努か 提交于 2019-12-10 13:35:11
问题 This doesn't return the expected results. Not sure how I can escape the left and right square brackets, so that PATINDEX takes them into account. Any clues? Many thanks. SELECT PATINDEX('%[[SQLSERV]].DBNAME.DBO.[[[0-9a-zA-Z]]]%','ert[SQLSERV].DBNAME.DBO.[Table name]asdadsf') This should return 3 but it returns 0. 回答1: Apparently closing brackets don't need to be escaped: SELECT PATINDEX('%[[]SQLSERV].DBNAME.DBO.[[][0-9a-zA-Z _-]%','ert[SQLSERV].DBNAME.DBO.[Table name]asdadsf') the above

Add multiple constraints in one statement

北战南征 提交于 2019-12-10 12:58:59
问题 I am supposed to modify my current table named MEMBER in Microsoft SQL Server 2012. I am trying to modify the tables ALTER TABLE MEMBER ADD CONSTRAINT U_MEMBERID UNIQUE(MEMBER_ID), primary key (MEMBER_ID); ADD CONSTRAINT Sys_date DEFAULT GETDATE() FOR MEMBER_ID; The above doesn't work and it says: Msg 156, Level 15, State 1, Line 3 Incorrect syntax near the keyword 'CONSTRAINT'. I think I am doing something wrong, but I am not sure what it is. ALTER TABLE TITLE ADD CONSTRAINT U_TITLEID UNIQUE

ReportViewer 11 (2012) Visual Studio 2010

百般思念 提交于 2019-12-10 12:57:55
问题 I am using Visual Studio 2010 and I installed "Microsoft Report Viewer 2012 Runtime" hoping to test the new reporting system in SQL 2012. After which I cleared for ref to "Microsoft.ReportViewer.WebForms" from my Web.config and removed the ReportViewer control from my toolbox and added the new version 11 ReportViewer. I added the new control to a testing page and for one it adds this register to the test page: <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture

How do I Specify Computed Columns in a Table which are based on another Column in SQL Server?

强颜欢笑 提交于 2019-12-10 12:27:53
问题 I have the following fabricated data seen below. I would like to alter the Total_Investment Column to make it a Computed Column which computes the total Dollar_Amount for the Unit Name that is present in that row. For example, for Row 1, the Total_Investment slot would show the sum of both rows that are listed as 'Healthy_Communities', so rows 1 and 6, eg., 5899.00 + 1766.00. Row 2 would sum all three (2, 5, and 9) of the Urban entries, and so on. How do I accomplish this in SQL Sever 2012?

SQL Server query - calculate availability of rooms

℡╲_俬逩灬. 提交于 2019-12-10 12:16:44
问题 I have a table name RoomInventory that has data like below Date (Date) RoomsAvailable (int) 1-Jul-2015 30 2-Jul-2015 30 3-Jul-2015 30 5-Jul-2015 28 6-Jul-2015 28 7-Jul-2015 28 8-Jul-2015 30 9-Jul-2015 30 10-Jul-2015 26 11-Jul-2015 28 12-Jul-2015 28 The result which I want is like below: StartDate EndDate RoomsAvailable ---------------------------------------------- 1-Jul-2015 3-Jul-2015 30 5-Jul-2015 7-Jul-2015 28 8-Jul-2015 9-Jul-2015 30 10-Jul-2015 10-Jul-2015 26 11-Jul-2015 12-Jul-2015 28

Cannot resolve the collation conflict in my query

笑着哭i 提交于 2019-12-10 12:14:28
问题 I'm trying to select a view & inner join it with another table in SQL Server 2012 but it is showing this error Msg 468, Level 16, State 9, Line 18 Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AI" in the equal to operation. This is my query: SELECT vpr.PARTNUMBER, vpr.DESCRIPTION, vpr.BUYER, vpr.[GL CLASS], vpr.[ABC CODE], vpr.TODAY, vpr.DAY1, vpr.DAY2, vpr.DAY3, vpr.DAY4, vpr.DAY5, vpr.[COO QTY], ROUND(vpr.[QOH-MSTORE], 0) AS [QOH-MSTORE]

sql server collation for multi lingual data

。_饼干妹妹 提交于 2019-12-10 12:13:47
问题 I am working with sql server 2012 and its the back end for an asp.net mvc multi lingual application. I have set the collation on the database that powers the front end to "sql_latin1_general_cp1_ci_as". This database will stored, english, russian, arabic etc data and therefore I will run in the collation problems as my stored procedures that will access my data has where clauses, order by clauses etc. I have on set of stored procedures for which I access the data for language with. I am