We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [sql-server-2012]

SQL Server 2012 (major build version 11.00.xxxx). Please also tag sql-server.

Filter by
Sorted by
Tagged with
-2
votes
2answers
620 views

SQL Server 2012 - Stopword Error [closed]

I am doing an exercise in Microsoft 70-461 certification book (written by Itzik Ben-Gan) In chapter 6-Query Full text data. I run the following query to create a stopword list. The system showed me ...
-2
votes
1answer
46 views

Query for max CPU, Memory and System Queue length

I am looking for a query to find maximum CPU, Memory and System Queue length for last month. Any help would be greatly appreciated.
-2
votes
1answer
52 views

Unable to insert data [closed]

I'm getting the following error System.Data.SqlClient.SqlException' occurred in System.Data.dll My code is as follows: Imports System Imports System.Data.SqlClient Public Class Form1 Dim ...
-2
votes
1answer
2k views

Trigger is not working in SQL Server 2012 on runtime? [closed]

In SQL Server 2012, I create two tables TABLE1 and TABLE2 After that, I created a trigger for TABLE1 Trigger name: PUSH_TABLE2 After creating the trigger PUSH_TABLE2, I test with below insert query ...
-2
votes
1answer
485 views

SSIS SQL Server 2012 cluster Availibility Group [closed]

We have a three server cluster using AlwaysOn technology, and have created an Availability Group for the SSISDB catalog. How would you change the code to only execute on the primary server?
-2
votes
1answer
262 views

SQL query for import data [closed]

How can I write a single line SQL for importing 20k rows data from Excel to SQL server ? Please don't tell me about import export wizard or to write 20 line repeatedly for do the same. Please tell ...
-2
votes
1answer
28 views

sql permissions problem [closed]

I have a server 2012 r2 running SQL server, on the server I have a application that attaches to a data base on this server. Whats happening : I can access the database from the server and the ...
-2
votes
1answer
28 views

how to avoid insertion of the two entries in database by two users which are working in same application with same database?

two users using one application and same database, when both of them are trying to insert new record at the same time on the same table of same database, they got same id. so how to restrict them from ...
-2
votes
1answer
70 views

How to write the SQL Query to find different table value

I have read numerous article and different blogs of SQL Server . I have an unique problem in this case. Let me explain you my problem statement. I have many tables and i cannot union it all. So, i ...
-2
votes
2answers
365 views

Extract hierarchical data from XML

I have a table: CREATE TABLE [Course].[Navigation]( [NavigationId] [int] IDENTITY(1,1) NOT NULL, ParentID int, ChildID int, [Type] [varchar](100) NULL, [Label] [int] NULL, [...
-2
votes
1answer
63 views

Retrieve SQL statements - No backup, No query tracing [duplicate]

I know that my question probably don't belong here but I would be really so thankful if someone has the skill for solving this out. I have recently made several update statements that I shouldn't ...
-2
votes
1answer
2k views

How to enter multiple checkbox list items into database for eventual reporting [closed]

(I tried posting this on SO but went unansered. I'll just post these theory type questions here from now on) I'm in the process of creating the first of a few CheckBoxList for a manually created ...
-2
votes
1answer
20 views

SQL Server 2012 AlwaysOn Availability

Environment: SQL Server 2012 AlwayOn with 3 Replicas. Primary ((Manual Failover)) Secondary1 (Manual Failover) -->Read_Intent Only --This is using for some reporting Secondary2 (Manual Failover)-->...
-2
votes
2answers
109 views

Procedure tr_employee_tbl_forinsert Column name or number of supplied values does not match table definition [duplicate]

I get error "Procedure tr_employee_tbl_forinsert Column name or number of supplied values does not match table definition" when I run the INSERT query below. What should I do? create table ...
-2
votes
1answer
300 views

NVARCHAR(MAX) to datetime conversion (SQL SERVER 2012)

I have a table in which a column is nvarchar(Max) and date value is stored as for eg: 'Tue Aug 22 00:00:00 PDT 2017' How do I convert this value to proper datetime value I tried Try_Convert, ...
-2
votes
1answer
361 views

Optimize a query using same temporary table in outer apply

I have a query using outer apply on the same temporary table again(written by someone long back). It is performing very slow.Please suggest ways to improve. Thanks in advance. UPDATE fb ...
-2
votes
1answer
43 views

SQL Server 12 Instance / server name change

I created a sql server instance and the name show up differently in test and prod. How can i change the prod name to not have the names repeating ? Prod : select @@servername EHCPSQL12\EHCPSQL12 ...
-2
votes
1answer
51 views

Design for table

I have a table: TABLE ( A int, B int, ..., H int, DataValue float ); All of my queries do aggregate operations, with A and some other columns (several combinations) in the WHERE clause (A is ...
-2
votes
1answer
43 views

when adding a table to my dbo.view I don't get the entire view

here is the code for my view that calls all rows from the tables: SELECT dbo.Purchase_Order.Purchase_Order_ID, dbo.Purchase_Order.Purchase_Order_Number, dbo.Purchase_Order.Purchase_Order_Date, dbo....
-2
votes
2answers
1k views

Can I Inner Join 2 tables based on multiple values for a column

This is what I want, TableA Inner Join TableB on TableA.ColumnA = TableB.ColumnA OR TableB.ColumnA = NULL I tried it and it returns empty ds? Edit Why I cannot use Right Outer Join and Left Outer ...
-2
votes
1answer
71 views

how to select column3 from rec1 value which is matched to column1 val in rec2

i am having following scenario : col1 col2 col3 10 2 13 13 4 14 14 5 15 15 6 16 form the above given table col3 value(13) in row1 is seen in col1 value(13) in row2 ...
-3
votes
1answer
45 views

login not having permission to see sql server properties

I need a login and that login should not view the sql server properties i.e.,login should not have permission to execute command select @@version
-3
votes
2answers
55 views

How can we get the output fields of a procedure?

I have written a procedure but I want to figure out what columns (fields) in the output without running the process?
-3
votes
1answer
1k views

Updating a string field by concatenating 2 int columns

I have 2 columns, an int and a tiny int, and I want to update another column, a varchar one, with the value column1 + '-' + column2. Something like this pseudo code: UPDATE COLUMN3 varchar = CONCAT (...
-3
votes
1answer
35 views

Minimum from Multiple Columns Syntax

This is what I have currently: UPDATE dbo.claims SET EXP_FEE = CASE WHEN CASE WHEN a.DLV_SYS <> 'MAIL' and a.FEE < a.CASH and a.FEE < a.GROSS_AMT THEN a.FEE WHEN a....
-3
votes
1answer
204 views

Optimizing an indexed view used for selects to also do updates

I have a materialized indexed view that returns ~2.6 million of the ~2.7 million rows in the table, causing the optimizer to mostly use clustered index scans. If I do an update on this view will it ...
-3
votes
1answer
194 views

How to achieve high performance management of a huge list of distinct strings [closed]

I am trying to achieve high performance management of a huge list of distinct strings in SQL Server (but I'm open to suggestions of alternate platforms that might be more performant). My specific use ...
-3
votes
1answer
98 views

Case statement with multiple condition [closed]

Case when a.name and a.rownum=1 <> b.name and (b.namereason isnull or b.namereason in ('') and b.rownum=1 then a.name when when a.name and a.rownum=1 <> b.name and (b.namereason isnotnull ...
-3
votes
1answer
57 views

SQL Server Backup does not run

After changing the sa password of SQL server 2012, the automatic backup doesn't run any more. Please see the log history: The backup was not implemented by me. Login failed for user 'sa'. ...
-3
votes
3answers
251 views

How to administer large databases? [closed]

This is my situation right now: I'm working with SQL Server 2012, and I have 2 databases, one is 3.5 GB and the other one is 7.6 GB, and the company I work with is going to migrate the server to a new ...
-3
votes
1answer
175 views

Backup file from SQL Server 2012 to 2008 [duplicate]

I have a backup file of SQL Server version 2012 but I want to restore that backup on SQL Server 2008. Question: Is this possible ?
-3
votes
1answer
72 views

Can not connect to HP\SQLEXPRESS [duplicate]

Can not connect to HP\SQLEXPRESS a network related or instance specific error while spablishing a connection to sql server. The server was not found or was not accessible. Verify that instance name ...
-4
votes
1answer
2k views

SQL Server 2012 Not matching Join Query

I have to generate a query output for not matching records. Assuming that i have two tables Table1 and Table2. Both Tables have the columns as DrugName. No Id column. Just the value column. I ...
-4
votes
1answer
100 views

How can i insert data into a NULL record in a column that allows NOT NULLS? [closed]

I hope my questions makes sense but what i am trying to do (which in my mind is obscenely simple which makes it more frustrating that i cant figure it out) is to change a column that consists of NULLS ...
-4
votes
1answer
76 views

Create database unique Surrogate Keys without using GUID’s

What is the best way to get database unique surrogate keys in Microsoft SQL Server when using something like “auto increment” as opposed to GUID's. The purpose is to increase performance over using ...
-4
votes
1answer
60 views

SQL Server LSCopy Job

Is the LSCopy job needed? Can the LSCopy job be disabled, pointing the LSRestore job to the location the Transaction logs are placed?
-4
votes
3answers
96 views

DATEDIFF with query [closed]

I want to know if i'm able to do something like this, or what can be the proper query for this? DATEDIFF ( year , , SELECT AVG (year(fechaBaja))FROM [erpVALLAS].[dbo].[sysCPEmpleados] , ...
-5
votes
2answers
117 views

Setting a low max memory size for SQL 2012 Developer edition [closed]

I tried to limit the Max Memory size for a local instance of SQL 2012 Dev edition to 64 MB but two things happened: 1) the value reverted to 128 MB when I tried to save and 2) the server kind of died. ...
-5
votes
1answer
151 views

Student position in exams giving me errors

I am working on a student database and will like to get the position of a student in his class based on the subject results in column f_score. I am getting an error which says: Incorrect syntax ...
-5
votes
1answer
320 views

Listing column dependencies

I want to alter the datatype of a table column from varchar(x) to varchar(y). To do that, I need to know what dependencies there are on this column. Any suggestions?
-5
votes
1answer
121 views

How to display data in Grid view based on logged In user.? [closed]

I am creating courier company application base on C# desktop application with SQL server. For that purpose I would like to create client user panel. What I want to display all shipments booked by ...
-6
votes
2answers
1k views

What are the advantages of sequences in SQL Server 2012? [closed]

I upgraded my SQL Server 2008 R2 to SQL Server 2012, and I had noticed a new feature was added: Sequence. I don't know the reason of adding sequences when there is an identity property. Can someone ...
-7
votes
1answer
94 views

SQL server 2012 installation [closed]

i'm installing SQL server 2012 x64 on windows 7 professional x64 and when i install it said to me your operating system doesn't meet the requirements !!