Tag: ssms

Cannot connect to SQL Server via Management 2012

I would like to connect to SQL Server 2012 using Management Studio. I can login without any issues when using windows authentication. I created a called develop, with password develop, and I gave it all the all the database roles. But instead of being able to logon. I get the following error: Please Assist Edit: […]

Importing multiple .xlsx files into SQL Server using SSMS (Basic, not Enterprise)

As the question states, I’m trying to upload roughly 2000 single-worksheet Excel files into a single SQL-Server database. The database has been set up using one of the excel files as a template and all the files have exactly the same layout. I’m hoping it’s as simple as copying the rest of the data across […]

Firewall rules to allow remote connection to SQL Server in a different domain

I recently installed SQL Server Express 2014 on a series of machines running Windows Server 2012. Seven machines in total. All but 1 of them live in the same local domain company.local. A single rogue machine lives in a different public domain public.company.org. The installation process on this machine on a separate domain was carried […]

Sql Server Management Studio 2012 tries to convert nvarchar to datetime during import

I am publishing an ASP.NET MVC 5 solution from my development box to my hosting provider. I have been using entity framework with localdb v11.0 on my dev box. My hosting provider provides a SQL Server 10.0 database. I am attempting to move my entire localdb to a SQL Server 10.0 db at my hosting […]

How do I change column positions in temporary table while it shows wildcard

I have a table with multiple columns, and when I run it, it shows the wildcard *. Usually to change the column positions I’d go to design query in editor as I’m using SQL Server Management Studio. However it doesn’t allow me to move the columns up and down, as all it shows is wildcard […]

Combining Row Info in DataBase

I’m currently working on a query that I need to combine some info for Below is the query that I have so far SELECT DISTINCT s.SiteID, s.GroupID, sa.StartDateTime, u.UserFirstName + SPACE(1) + UserLastName ScanName, CONVERT(VARCHAR,sa.StartDateTime,101) ApptStartDate, CONVERT(VARCHAR,sa.EndDateTime,101) ApptEndDate, CONVERT(VARCHAR(15),CAST(sa.StartDateTime AS TIME),100) ApptStartTime, saa.Time ArrivalTime, sl.Address, st.StateShortCode, ct.CityName, CASE saa.CheckInCallType WHEN 1 THEN ‘Inbound’ WHEN 2 […]

DATEDIFF to only include working days?

This question already has an answer here: get DATEDIFF excluding weekends using sql server 5 answers

Automating Export of MS SQL Table with a binary column (750,000 character length)

This may or may not be possible. I know sqlcmd could be used to export tables from MS SQL to a csv but my column gets truncated at ~ 65,000 characters. Is there a way to automate the process of exporting a table from MS SQL which has strings with length upto 750,000 (binary data). […]

How to return . in SQL MS results to grid

Say I am querying multiple tables like so SELECT T1.*, T2.* FROM T1 INNER JOIN T2 … etc. In SQL Server Management Studio, I want the results to show in the grid with the table names prepended to the column names What I get by default is this: ID | A1 | … | ID […]

Linq to SQL Where clause returns records that do not match, only when “Edit Top 200 Rows” is used in SSMS?

I’m having issues wording this question, as the title will probably show you, and for that I apologize. First, here’s a screen of the issue. That If clause there was an attempt at fixing this, but it didn’t help. Every 500ms, the program will run this code to find work that needs to be done. […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.