Questions tagged [ssms-2012]

Microsoft SQL Server Management Studio 2012

Microsoft SQL Server Management Studio (SSMS) 2012 is an easy-to-use graphical management tool for managing SQL Server 2012 Edition with Advanced Services.

The tool includes both script editors and graphical tools which work with objects and features of the server.

258 questions
-1
votes
1 answer

Counting specific rows from table

I have to change my question. I manage to create temp table with data about orders. I am not able to post a screenshot. Columns are: rownumber, account, orderposition, ordernnumber, opentime, closetime, modifaytime, symbol Rows look like this FIRST…
-1
votes
2 answers

How to setup trigger based audit?

I have a table Employee: CREATE TABLE [dbo].[Employee] ( [EmployeeCode] [int] NOT NULL, [FirstName] [varchar](50) NULL, [LastName] [varchar](50) NULL, [Email] [varchar](50) NULL, [Position] [varchar](30) NULL ) I want to log…
Victor McIntyre
  • 93
  • 1
  • 10
-1
votes
1 answer

Error when trying to show tables content from the staging server(Azure) via SSMS

I am connected to a remote Microsoft Azure server via SQL Server Management Studio. The problem I am facing is that I am not getting an option to "Select Top 1000 rows" of a table (screenshot attached). What I am doing wrong? I am using SSMS2012.…
Ferid Š. Sejdović
  • 998
  • 4
  • 18
  • 48
-1
votes
3 answers

TSQL How to select value based on another value

So I am trying to select one value based off the value of another column. For example, in the below table rows, I would like to select the ID column where none of that specific value has the value of "Transferred" for the Status column. So with…
-1
votes
2 answers

CREATE FUNCTION

SSMS keeps giving me a system error: Incorrect Syntax: CREATE FUNCTION must be the only statement in the batch I don't know what I'm doing wrong :( please help CREATE FUNCTION fx_avgVacationHrs (@whatgender varchar(5)) RETURNS INT AS BEGIN …
-1
votes
1 answer

SSMS query window hyperlink in text

I've put together a variable of type nvarchar(max) for the body of an email being send with db_sendmail. The problem is that in copying the body over from a stock email message into the SSMS query window, only those hyperlinks that are actual web…
-1
votes
1 answer

MY mouse cursor is being freezed while work on ssms

I have a strange situation. i have installed SSMS on my laptop and it runs well the first time, connected to server but after few times, the mouse cursor being freezed while work or execute the query over ssms 2012. i have reinstalled the ssms 2012…
-1
votes
4 answers

How to specify year only as a datatype?

I'm creating a table and want to store one field as date datatype. However I only want to store the year and not additional info (ie: month, day, or time.) Here is what I have so far: CREATE TABLE Project (ProjectID int not null identity(1,1)…
user4966755
  • 41
  • 1
  • 6
-1
votes
3 answers

How to get NULL as values for invalid column

I'm using Sql Server 2012. Consider the table schema to be, create table A (col1 int, col2 int) I'm trying to execute this query, select col1, col2, col3, col4 from A I get execution error as col3 and col4 are not in table. But is there any way,…
Raja
  • 85
  • 1
  • 1
  • 7
-1
votes
1 answer

Using TFS 2010 Source Control with SQL Server 2012 SSMS to manage SQL Scripts

I have an ongoing need to manage, in TFS source control, a collection of SQL scripts organized as an SSMS solution (.ssmssln file). I'd like to capture the "success path" for using SQL Server 2012 SSMS with TFS2010, using the appropriate MSSCCI…
Developer63
  • 640
  • 7
  • 19
-2
votes
1 answer

UPDATE Statement with concatenate row values

The database table having Column1 and Column2. Fetch the values and map the column (Column1 and Column2) details and update in Column3 Column3 should have Column1 value where the Column1 value is equal to Column2 value. Please refer the attached…
Venkatesh R
  • 515
  • 1
  • 10
  • 27
-2
votes
1 answer

I have to give Grant and With-Grant permission to a user in SQL Server

I am trying to set me as a grantor in SQL Server 2012. I am logging into the database engine from my Windows account, then trying to give connect SQL (COSQ) permission to the other account, but after applying the settings, when I opened the…
-2
votes
3 answers

SQL query seconds to date (Ssms12)

on the stackoverflow site in fount Thad select CONVERT(CHAR(10), DATEADD(second, MAX(60), 0), 108) will result in 00:01:00 (that's true btw :-) ) now I want to integrate this in the following query (for Ssms12): SELECT…
Thomas
  • 39
  • 1
  • 7
-2
votes
2 answers

How do I create a null column but with default value in SQL?

I am trying to create a Shopping Cart, where customer could choose if they want delivery or store pickup for their items. Default price for delivery would be $10. How do I set the default value of delivery to be $10, but only when Customer picks…
-2
votes
3 answers

How to combine multiple rows from 3 tables into one row

I have 3 tables that look something like this: Table A Student id   | Course Name |Course Section 1                 | English            |A 1                 |…
1 2 3
17
18