sql-server-2014 Questions

1

I am using the below query in the stored procedure SELECT @ICOUNT = COUNT(*) FROM MESSAGES WHERE CAST(CREATEDDATE AS DATE) >= CAST(@STARTDATE AS DATE) AND CAST(CREATEDDATE AS DATE) <= CAST...
Wenn asked 12/2, 2019 at 8:41

4

Solved

I am using Microsoft SQL Server 2014 and have a table with three columns and the field data type is Decimal(38,0). I want to update each row of my table to insert a decimal point after the first t...
Aurangzeb asked 4/2, 2019 at 12:13

1

Solved

I am using SQL Server 2014. I am facing a problem when I want to compare previous row date time with current row in second. The error states: The datediff function resulted in an overflow. The n...
Messy asked 17/1, 2019 at 5:9

5

Solved

I'm trying to repeat the first specific non-empty value in a column till the next specific non-empty value in the same column. How do I do that? The data looks like this: ID | Msg ---+----- 1 ...
Lavalava asked 14/1, 2019 at 20:47

2

Solved

I am trying to join two tables by first converting a comma separated values from a column "SupplierId" which I am doing successfully. However, the issue comes in when I try joining to another table...
Smyrna asked 6/1, 2019 at 21:11

5

Solved

I have the following table: ----------------------------------------- xDate xItem xCount ----------------------------------------- 2018-01-01 A 100 2018-01-01 B 200 2018-01-01 D 500 2018-01-02 C 2...
Slather asked 26/12, 2018 at 7:26

1

I am using the Progress DataDirect (glorious...) JDBC driver for Microsoft SQL Server 2012 & 2014. Both servers are completely updated windows as well as SQL server wise. Both enforce encryptio...
Earthly asked 10/3, 2016 at 14:14

9

I'm trying to install SQL Server Data Tools - Visual Studio 2015, but I keep getting an "Unspecified error". The log file is at https://drive.google.com/open?id=0B3CEKzS2Sw8OODNJOXZJVGRWQlU. I ...
Misfeasance asked 12/10, 2016 at 14:7

2

Solved

I am trying to connect to Sphinx from SQL Server Management Studio as a Linked server. I tried the following query: EXEC master.dbo.sp_addlinkedserver @server=N'SPHINX_SEARCH', @srvproduct=N'', @p...
Isomerous asked 31/10, 2018 at 9:45

2

Solved

I am confused in these two and tried to figure out the differences but didn't get something specific for which I am looking for. Where to use indexed view over an ordinary view. Some important di...
Celeriac asked 14/9, 2018 at 7:3

3

I have a table with measurements. Measurement is done every minute. I need to select only rows having the same sample_value more than once consecutively for the same device_id. Here are initial da...
Ioneionesco asked 22/8, 2018 at 10:14

5

Solved

I am using SQL Server 2014 and I am working with a column from one of my tables, which list arrival dates. It is in the following format: ArrivalDate 2015-10-17 00:00:00.000 2015-12-03 00:0...
Radon asked 19/10, 2015 at 11:28

2

Solved

I have been trying to Write a Stored Procedure where i can perform UpSert using Merge with the Following Condition If Record is Present then change EndDate of Target to Yesterday's day i.e., Pres...
Branchiopod asked 12/7, 2016 at 12:29

2

Solved

I just installed my SQL Server 2014 on the top of Windows Server 2012. But after installation SQL Agent is not starting. Can someone tell me like what can I do to solve this? PFA screenshot for the...
Harberd asked 7/4, 2016 at 6:36

4

Solved

I am currently running SQL Server 2014 and need to install SSAS. Is it best to match the version of SSAS to the version of SQL Server installed or is it recommended that the newest version of SSAS ...
Forfend asked 9/8, 2017 at 17:44

1

I've googled for a few days and can't get this working. I'm using SQL 2014 and the adventureworks database. I've got SAS 9.3. I've tried different ODBC settings, as in setting a default databas...
Sumo asked 11/8, 2015 at 6:2

1

I encounter that SqlCommand.ExecuteScalar() returns NULL sometimes in production environment. I've crossed a lot of similar questions here, the most close one is: SqlCommand.ExecuteScalar returns ...
Lowery asked 16/3, 2018 at 16:7

1

I am trying to implement a number of base/sub classes using Entity Framework, database first. Following some online tutorials, I have decided to attempt TPT inheritance. On the database, I have a...
Cervin asked 23/1, 2018 at 18:37

3

Solved

IF @SQL IS NOT NULL BEGIN BEGIN TRY EXEC sp_executesql @SQL PRINT 'SUCCESS: ' + @SQL END TRY BEGIN CATCH SET @ErrorMessage = N'Error dropping constraint' + @CRLF + 'Table ' + @TableName ...
Eleneeleni asked 25/1, 2016 at 21:54

2

Solved

I have the following table: -------------------------------------------- ID ParentID Item -------------------------------------------- 1 root 2 1 AA 3 1 BB 4 1 CC 5 1 DD 6 2 A1 7 6 A11 ff. I wa...
Galloromance asked 28/3, 2018 at 7:39

2

Solved

I produced a dynamic pivot with the following query which work but the column (monthyear) are in alphabetical order but I want them in chronological order The monthyear column is derived using a fu...
Roley asked 22/3, 2018 at 10:22

2

Solved

I'm stumped on something which should be very straight-forward. I have a SQL Server database, and I'm trying to update a non-nullable varchar or nvarchar field with an empty string. I know it's pos...
Jennifer asked 26/1, 2018 at 22:45

9

Solved

I have a View View_Booking in sql server 2014: bkID bkSlot bkStatus ---- ------ -------- 2 Lunch 1 4 Lunch 1 6 Dinner 0 7 Lunch 1 While in c# I have used a gridview and casted bkStatus into stri...
Kukri asked 28/12, 2017 at 19:32

3

I am getting strange results when using inline function. Here is the code: IF EXISTS ( SELECT * FROM sys.objects AS o WHERE name = 'vendor_relation_users' ) DROP FUNCTION dbo.vendor_relation_users...
Wheezy asked 15/12, 2017 at 14:41

1

I am trying to add multiple criteria to a Where clause in SQL Server 2014 using the following code and I am getting a syntax error. I have tried a case statement but cannot get that to work based ...
Adamina asked 24/11, 2017 at 16:23

© 2022 - 2024 — McMap. All rights reserved.