ssms

SQL Server Import and Export Wizard and PostgreSQL

╄→尐↘猪︶ㄣ 提交于 2019-12-10 23:15:26
问题 I am trying to export data from PostgreSQL to MSSQL Server. Currently, I am exploring the SQL Server Import and Export Wizard. I have installed the native postgres driver and got the .Net Data Provider for PostgreSQL . Everything seemed fine until I tried to use it. I got the following: Cannot get the supported data types from the database connection Is this a driver problem or am I missing something? Update: Like @Panagiotis Kanavos suggested I have installed OLEDB driver There seems to be a

Can I get SSMS to switch to the Messages tab programatically?

泪湿孤枕 提交于 2019-12-10 20:08:15
问题 I'm writing a fairly long running script, which prints progress messages as it goes. However, SQL Server Management Studio by default shows the resultset tab, not the messages tab, so the user will have to click the messages tab after starting the script to see the progress as it happens. Is there a way for my script to tell SSMS to show the messages tab automatically? I know SSMS will remove the resultset tab once the script is complete, since it doesn't generate any resultsets, but I want

Is there a way to bind SSMS 2012 keyboard shortcuts to a procedure in a way where I can pass the fully qualified object name?

南楼画角 提交于 2019-12-10 19:59:35
问题 In SSMS 2012, is there any way I can bind a keyboard shortcut (e.g. Ctrl - 5 ) so that I can highlight a qualified object name (e.g. master.sys.objects ) and invoke my own procedure using that object name as the argument? I know that this does work if I explicitly add quotes or brackets around the object name prior to using the keyboard shortcut (e.g. highlight the string 'sys.objects' , but this becomes tedious when wanting to use my shortcut easily by directly highlighting tables in

If count(values) > 1, combine all values into a single cell [duplicate]

喜夏-厌秋 提交于 2019-12-10 17:28:11
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: SQL Server: Can I Comma Delimit Multiple Rows Into One Column? I would like to combine all records in a certain field into a single cell (per value from another column) if the count of the records is more than 1. For example, if I have the following code SELECT city, count(zoo name) AS 'count of zoo name' FROM mytable It would generate the below results The original table looks like this Since both Atlanta and

SQL Server 20XX - “encryption not supported on the client” when compiling stored procedure with linked server query

自古美人都是妖i 提交于 2019-12-10 16:35:54
问题 Attempting to compile a stored procedure in SSMS, which contains an open query to a linked server. The linked server is connected and in my 'Server Objects/Linked Servers' folder. I can do the open query in a query tab, but when the same query is ran within the procedure, I get the error Encryption not supported on the client This was just working yesterday, with no changes on my end, that I'm aware of. I am using SQL Server 2014 locally on my machine, and the procedure is attempting to

Microsoft SQL Server Management Studio Rewrites my query incorrectly

℡╲_俬逩灬. 提交于 2019-12-10 15:24:52
问题 I am trying to create a simple view in Microsoft SQL Server Management Studio 2008 R2. I tried using the Views > New View designer as well as typing the CREATE VIEW command directly in to the query builder, but no matter how I create it, the studio malforms my query. Here is the source query. Pay special attention to the WHERE clause: SELECT RTRIM(Orders.ITEMNUMBER) AS ItemNumber, Orders.Type, Orders.Quantity, Orders.OrderNumber, OrderDetails.SaleDate, OrderLineItems.ReturnType,

How can I program a keyboard shortcut to select top 1000* from selected table?

心已入冬 提交于 2019-12-10 15:05:42
问题 Is there a way to create a keyboard shortcut in ssms 2012 that when pressed will have the same effect as select top 1000 * from mytable ? I have explored this already: http://msdn.microsoft.com/en-us/library/ms174178. Often times when exploring a database very frequently the programmer needs to select top records from tables. If this is not customizable in ssms, I would be happy with a c# solution, 回答1: Tools -> Options, then Environment -> Keyboard -> Query Shortcuts. Assign a key to be:

Modify binary(1) column in SSMS grid

↘锁芯ラ 提交于 2019-12-10 14:57:48
问题 Following is the error I get when I try to modify / insert 1 or 0 into a binary(1) column: Invalid value for cell (row 4, column 5). The changed value in this cell was not recognized as valid. .Net Framework Data Type: Byte[] Error Message: You cannot use the Result pane to set this Field data to values other than NULL. Type a value appropriate for the data type or press ESC to cancel the change. 回答1: That is just the way it is for binary fields. You have to write an update statement to

How to solve Microsoft SQL Server. Error 233. Provider: SSL Provider

时光总嘲笑我的痴心妄想 提交于 2019-12-10 13:44:30
问题 After the global RansomeWare attack, we updated our Windows Server 2012 R2 only to find out that our SQL Server Management Studio (SSMS) stopped working. Whenever we try to connect to SSMS locally or remotely it provides us the following Error: A connection was successfully established with the server, but then an error occured during the login process. (Provider: SSL Provider , error: 0 - No process is on the other end of the pipe.) ( Microsoft SQL Server, Error: 233 ) I tried logging in

sql delete row error

末鹿安然 提交于 2019-12-10 13:24:11
问题 I am trying to delete a row in sql server management studio 2012 but an error appears: sql error No rows were deleted A problem occurred attempting to delete row 2 Error Source: Microsoft.SqlServer.Management.DataTools Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows) Is there a way to fix error that without typing any query? 回答1: You don't have a primary, unique key in your table. SQL Server is unable to delete your row