ssms

“Create new table” is not visible on SSMS 2016 for SQL Server 2008

吃可爱长大的小学妹 提交于 2019-11-27 23:18:46
I have a shared hosting. I was happy with it. I was creating new databases on its panel and then I was managing my databases with SQL Server Management Studio. I could add new table by right clicking the database with designer. Database is: SQL Server 10.0.2531 (SQL Server 2008 SP1 I think) My SSMS details Microsoft SQL Server Management Studio 13.0.15500.91 Microsoft Analysis Services Client Tools 13.0.1605.86 Microsoft Data Access Components (MDAC) 10.0.10586.0 Microsoft MSXML 3.0 6.0 Microsoft Internet Explorer 9.11.10586.0 Microsoft .NET Framework 4.0.30319.42000 Operating System 6.3.10586

Date Range for set of same data

好久不见. 提交于 2019-11-27 22:41:54
问题 I am trying to build a SQL query which will give me the date range for the dates with same prices. If there is a break in the prices, I expect to see it in a new line. Even if sometime during the month there are same prices, if there is change in the prices sometime in between I want to see it as two separate rows with the specific date range. Sample Data: Date Price 1-Jan 3.2 2-Jan 3.2 3-Jan 3.2 4-Jan 3.2 5-Jan 3.2 6-Jan 3.2 7-Jan 3.2 8-Jan 3.2 9-Jan 3.5 10-Jan 3.5 11-Jan 3.5 12-Jan 3.5 13

What's the difference between SQL Server Management Studio and the Express edition?

旧城冷巷雨未停 提交于 2019-11-27 20:42:12
问题 I'm using Express currently. What extra features do I get with the full edition? 回答1: There are no differences in Management Studio. The differences are in the database engine LIMITATIONS! The engine is the same but it will deny you some features. Import/Export wizard in the express edition can be found at: C:\Program Files\Microsoft SQL Server\90\DTS\Binn\DTSWizard.exe If you dont have it, dowload it from Microsoft: http://go.microsoft.com/fwlink/?LinkId=65111 You could install the Microsoft

Cannot install adventureworks 2012 database - Operating system error 5: Access is denied

巧了我就是萌 提交于 2019-11-27 18:48:15
I am trying to install AdventureWorks 2012 database in sql server 2012. I got the mdf file from this link - http://msftdbprodsamples.codeplex.com/releases/view/93587 Here is the name of the file I downloaded - AdventureWorks2012_Database.zip I am doing all this on a windows 7 64 bit. I get the error below: Attach database failed for Server 'SuperPC\SQL2012'. (Microsoft.SqlServer.Smo) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=11.0.2100.60+((SQL11_RTM).120210-1917+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates

Auto-increment primary key in SQL tables

懵懂的女人 提交于 2019-11-27 18:27:21
Using Sql Express Management Studio 2008 GUI (not with coding), how can I make a primary key auto-incremented? Let me explain: there is a table which has a column named "id" and the items of this column are set to be primary keys. I want to make this column auto-incremented, but how? Cheers Chris Diver Presumably you are in the design of the table. If not: right click the table name - " Design ". Click the required column. In " Column properties " (at the bottom), scroll to the " Identity Specification " section, expand it, then toggle " (Is Identity) " to " Yes ". Right-click on the table in

Update query cancelled by user

我是研究僧i 提交于 2019-11-27 18:17:08
问题 I have a table that has millions of rows. Accidentally I wrote an update query over a table without where clause and clicked execute. It started executing. After two seconds I realized the query is wrong and I clicked ' Stop ' button in Sql Server Management Studio . The query execution was stopped, this all happened within 7 seconds. Now I am curious to know if there are any rows affected. If any which are they? How to find it? 回答1: A single update statement will not update some rows. It's

Add unique constraint in SQL Server 2008 GUI?

这一生的挚爱 提交于 2019-11-27 18:06:26
I have an existing table with data. I have just added a new column but I cannot find how to add a unique constraint on that column. Could someone please advise? Right-clicking and selecting "check constraints" wasn't helpful. You need to right-click in the table designer and pick Indexes/Keys : Then a dialog pops up and you can add a new index to the list of indices (on the left hand side) and define it to be a unique index: Do right-click in the table designer and choose Indexes/Keys . Indexes/Keys window will open. Click the button Add , to create the new index/key, and choose the column to

How to connect to LocalDb

一世执手 提交于 2019-11-27 17:49:07
I installed LocalDb using the SqlLocalDb.msi package and I can connect to it using SSMS using the server name (LocalDb)\v11.0 . So far so good. The problem is that when I try to connect to it via a .NET 4.5 application I get the error The server was not found or was not accessible. I started with the connection string Data Source=(LocalDb)\v11.0 and then added many things to no avail (integrated security true/sspi, attaching a db, using instances, etc.) Krzysztof Kozielczyk I think you hit the same issue as discussed in this post . You forgot to escape your \ character. Chris Wolf I am totally

Invalid Object Name sql

情到浓时终转凉″ 提交于 2019-11-27 17:44:06
问题 I keep getting an invalid object name error on my sql code. ( member_number, subscriber_policy_number ) is underlined with the error message. The code itself runs fine with no errors, why does this happen? None of the code above this is highlighted update smmdmm.aid_data set Member_Number = Subscriber_Policy_Number where Member_Number in ('000000000','000000001') 回答1: Make sure you're using the correct database. It may be defaulting to the "Master" database, and it doesn't look like you have

How to get export output in “real” CSV format in SQL Server Management Studio?

烈酒焚心 提交于 2019-11-27 17:19:48
I have a query that I am running in SQL Server Management Studio (connecting to a SQL Server 2005 database). I want to export the data in CSV format. Not wannabe CSV format, where you just stick a comma between each column, but "real" CSV format, where you put quotes around your strings. This way you can export data that has commas or quotes in it. All the examples I see limit themselves to the wannabe format. I can't figure out where the option to quote strings is. If SSMS is truly incapable of this basic feat, are there other tools that will do it easily? I don't want to have to write a C#