Questions tagged [sql-server-2014]

Use this tag for questions specific to the 2014 version of Microsoft's SQL Server database engine. SQL Server 2014 is the predecessor of the later SQL Server 2016.

SQL Server 2014 (codename Hekaton, version 12.00), released in April 2014, is the successor to SQL Server 2012 and the predecessor of the newer version of Microsoft's SQL Server database engine SQLServer 2016.

This tag covers questions specific to the 2014 version of the database engine. It is recommended that the tag is also used when tagging questions with this version specific tag.

Read more about SQL Server 2014 from MSDN.
Get SQL Server 2014 from here.

4735 questions
1
vote
0 answers

Ad hoc Updates to System Catalogs

I know this question has been addressed elsewhere, but I cannot figure this out. I have this view: SELECT t.name AS 'TableName' ,c.name AS 'ColumnName' ,SEP.VALUE as 'DETAILS' FROM sys.columns c JOIN …
ThexTallxDude
  • 137
  • 1
  • 1
  • 11
1
vote
1 answer

SQL Bulk Insert UTF-8

I have a UTF-8 file with a ¬ field delimiter and [CR][LF] row terminator. The SQL Version is Microsoft SQL Server 2014 (SP2-CU7) (KB4032541) - 12.0.5556.0 (X64) I am using bulk insert to load the txt tile in a table as below: DECLARE @bulk_cmd…
BIQuad
  • 15
  • 4
1
vote
1 answer

Getting Null error even tho there should be a value via the foreign key

I keep getting an error message when trying to enter my data into the books table error(Msg 515, Level 16, State 2, Line 32 Cannot insert the value NULL into column 'booksPubID', table 'Librarys.dbo.books'; column does not allow nulls. INSERT…
1
vote
3 answers

Sum Value if Two Specific Values Occur on the Same Day

I've got a dataset that has species' harvest by weapon type by dates. Data set example below: Species Total HarvestMonthDayYear WeaponID WeaponType Deer 623 1/14/2017 1 Gun Deer 10 1/14/2017 3 …
MISNole
  • 992
  • 1
  • 22
  • 48
1
vote
5 answers

MSSQL CASE after ORDER BY not working with alias

Hello Stack Overflow Community! I'm sitting here with my colleague and we're trying to solve a problem we currently have with MSSQL 2014. We have a table with a number of columns, where two of them are containing a Date. Just for comprehension; one…
3m7ecc
  • 52
  • 1
  • 10
1
vote
1 answer

Datamart - Table type

I am working with DatMart with out any tool.I have table where its lists student details. SystudentID Campus FirstNAme LastName 8 AICASA Ali Mehdi 9 AICASA Ashka Patel 10 AICASA Jane …
1
vote
1 answer

Finding Query window in ALM

I am trying to use some SQL queries in HP-ALM, but I am unable to find the query window. In HP website, it says 1.On the ALM sidebar, under Dashboard, select Analysis View. 2.Expand the analysis tree and select an Excel report. 3.Under the…
Avi
  • 1,795
  • 3
  • 16
  • 29
1
vote
2 answers

Why is my view created in my user schema?

I'm using MSSQL Studio and am connected to a SQL Server 2014 with my windows credentials (DOMAIN\user). I just created a new view and wondered why another user could not find it: CREATE VIEW abc AS SELECT 1 AS a Unexpectedly this view was not…
Spock
  • 260
  • 1
  • 13
1
vote
1 answer

Detect if an action was made by other trigger SQL SERVER?

I'm using SQL SERVER 2014. I have a table where it has 2 triggers (for update). Trigger 1 - updates columns A. (which causes Trigger 2 to be invoked) Trigger 2 - updates columns B. (which causes Trigger 1 to be invoked) Question: Within a trigger -…
Royi Namir
  • 144,742
  • 138
  • 468
  • 792
1
vote
1 answer

SQLSTATE[01003]: [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation

I am trying to run the following code DB::table('gbb_intimation_claim_max_serial')->where('id', 1)->increment('intimation_max_serial'); $intimation_max_serial = DB::table('gbb_intimation_claim_max_serial')->where('id',…
Shateel Ahmed
  • 1,264
  • 2
  • 12
  • 23
1
vote
2 answers

Grouping By Two Column But Only Showing One

I'm running the following script. select PlateID1, PlateID2, Max(TimeStamp) as LastVisit, Min(TimeStamp) as FirstVisit, count(PlateID1) as VisitCount from ActivityLog where (TimeStamp > '9/15/2017 12:00:00 AM' and TimeStamp < '9/18/2017…
Matthew
  • 19
  • 4
1
vote
2 answers

How to get desired output from this query in sql

I have a table structure listed below, SL R_ID Name AMT1 AMT2 AMT3 Pos 1 5 ggg 10 60 22 Left 2 5 hhh 44 88 47 Right I want Output Like this LSL LID LName LAMT1 LAMT2 LAMT3 LPos SL RID RName RAMT1…
Babai
  • 99
  • 1
  • 14
1
vote
3 answers

Retrieving distinct values and a count on duplicates in SQL

We have a table, lets call it "source-table", from where I retrieve these columns like this; ANr, TNr, Type, IDate, EDate 1132173, 113615, Bogus, 2017-09-11 13:01:00, 2017-09-13 14:10:00 1132145, 184210, Triss, 2017-09-11 13:05:00, 2017-09-13…
Tomas H
  • 57
  • 7
1
vote
2 answers

SQL Server 2014 Select total for each day

Hello I am working on a dataset for a report in SSRS and I have a query which gives the total requests in the backlog : SELECT COUNT(*) as NB FROM p_rqt WITH (NOLOCK) INNER JOIN p_cpy WITH (NOLOCK) ON p_cpy.CpyInCde = p_rqt.OrigCpyInCde WHERE …
loxod
  • 63
  • 1
  • 7
1
vote
0 answers

SQL Server 2014: column dependencies / lineage

I would like to know which columns of a table or view are part of a column in my current view. For a "basic" version, I used columns for current view, I used sys.views and sys.dm_sql_referenced_entities ... and some other system catalog…
Falko
  • 206
  • 1
  • 8