Connection string
I am having issues with a connection string. At the moment we have a web page requesting data from a SQL server 2005 database. The database is now being moved to SQL Server 2014 on a new server. The...
View ArticleCalculating time diff assistance
This is going to be a difficult one to explain, I'll do my best:[code language="sql"]DECLARE @StartDate AS DATE = '1/1/2017'DECLARE @EndDate AS DATE = '1/31/2017'SELECT Radio_Name,
View ArticleIn-Memory OLTP
This question is for anyone with experience with memory-optimized tables and natively-compiled stored procedures in SQL Server 2014.I have a stored procedure that among many of the queries, it updates...
View ArticleHow do page splits work with large amounts of sequential data inserted in the...
Let's say I have a table with a large number of records that has a clustered index on a varchar column.One day, I need to add a large number of sequential records that all begin with 'B'. There are no...
View ArticleJoining INSERTED and UPDATED tables when PK column changes
Hi SSC,First off, as should probably be as common as to need no explanation, I did not build the system in question, so "best practices" aren't my immediate concern.Second, I've given a lot of detail...
View ArticleInstead of Update Trigger
Hi , I created a instead of update trigger . Something like below. Can this be modified and instead of two updates , can i get it to write one update ? if so how?create trigger as Instead of trigger...
View ArticleSQL Agent job Data source connection for SSIS DB connection is not current
Hi,I have many SSIS packages (stored in File System) which are configured to use ENV variable for DB connection. I had to recently change the Env value to use SQL listener. When I open the packages in...
View ArticleALLOW_PAGE_LOCKS = OFF ignored?
Hello,I am troubleshooting lock waits and timeouts in our application. I found that one cause for the lock waits are page locks on some indexes, and tried to improve the situation by disallowing page...
View ArticleQuerying against XML
Hello all,I have the following xml and I'm trying to build a query that will output ids of both familyid element and memberid element under each family node. Is it possible using sql?DECLARE @XML...
View ArticleDescription empty from DMV queries
We are trying to make SSAS description fields available in our pivot explorer as an instant user documentation. DMV queries is the attempted method of extracting the information.Descriptions of...
View ArticleWeird SSRS issue - column not displaying data
Hello, I have a report that I've been working on that is created from a Stored Procedure (sproc). The sproc is returning data in all columns and the data is validated. So I went to create an SSRS...
View ArticleTurning Cols into Rows
Hello, I am looking for a way to turn 2 columns into rows. I thought doing a PIVOT would be how to solve this problem but realize there are not enough fields. Using the example below, is there away to...
View ArticleMDX query to get Patient Count measure aggregation for last 36 month from...
How can I write an MDX query to get Patient Count measure aggregation for last 36 month from Year End.I am using SSAS on SQL Server 2014. My cube is named BR. I have a Patient Count Dimension and...
View ArticleDead lock graph analysis
Can you please help me explain this dead lock graph? I'm novice in reading this graph. I'm pretty sure SELECT and UPDATE are interfering each other. Developer thinks he's issuing UPDATE after SELECT...
View ArticleReally weird SSRS column bug
I have this query: [code]SELECT T.TABLE_NAME AS [Table], C.COLUMN_NAME AS [Column], C.IS_NULLABLE AS [Allows Nulls?], C.DATA_TYPE AS [Type],case when CHARACTER_MAXIMUM_LENGTH <0 then 'Max' else...
View ArticleRound decimal
Hello,when in my select I have 0,00 (decimal (4,2)), how can I round it to 0?Thanks a lot. Luigi
View ArticleOptimizing a query
This needs to be a SQL view for C# to consume. I am sure there is a better way to write this, but I am not aware of how to do it.[code language="sql"] SELECT S.Id, 
View Articleand,,Clinton,,communications,,
[url=https://www.linkedin.com/pulse/man-city-vs-monaco-ameer-khaleed]Manchester City vs Monaco Streaming Live[/url]
View ArticleConverting Numbers to Letters
Hi Everyone,I am looking to convert numbers in a delimited string to corresponding letter.For example, if the string is '2,3,4' I want to convert it to 'B,C,D'Important to note that their can be both...
View ArticleSQLCMD
Hi , When i am trying to execute SQLCDM getting following error.Sqlcmd: '-i': Missing argument. Enter '-?' for help.Following is the scriptWrite-Output("`r`n*** Executing CreateHmsDb.sql...
View Article