Poor T-SQL code runs for over 10 hours !!! Help appreciated....
I am new to SQL Server and know next to nothing about T-SQL, although I do know a bit about SQL. Our purchasing department got a database package and some customised T-SQL from an external company and...
View Articleincrementing value sql query help
I have two columns in a table right now. My query is inserting data into this table from another so that non technical users can view this database value via excel. One column shows the date and the...
View ArticleColumnstore and Slowly Changing Dimension
HelloI have an existing SSIS that uses SCD on a rather large table. I am also migrating to SQL2014 Enterprise. My question is, is it possible to use SCD and Columnstore(CS) together? I know that I can...
View ArticleReverse recursion for some specific statistical calculation
Hi All, First of all, I couldn't come up with a better title explaining my t-sql challenge. Sorry :)I have been trying to wrap my head around this for days. I have a table :id + A + B 1 |0,11| 02...
View ArticleCall SSRS snapshot report dynamically
Hi Guys, We are setting up a new reporting environment for our client and as part of the deliverable I need to achieve the following two things, on which I need expert's advise. 1. Most of our reports...
View ArticlePerformance of the new (2014) Cardinality Estimator
Has anybody had any experience (good or bad) with this? Microsoft's own documentation ([url]http://msdn.microsoft.com/en-us/library/dn673537.aspx[/url]) hints at improvements while warning:[quote]While...
View ArticleDEADLOCK and NOLOCK question for reading parameters from DB.
Hi guys.Here's the scenario: aspnet application, about 300 web requests per second, each request generates 10 to 20 sql server requests. In my vb6 times it was very easy to generate DEADLOCK error with...
View ArticleI know everybody raids so much
I like the Patent one so much better than these that I'm [url=http://gojivitabr.com/]Goji Vita [/url] not sure what I'm going to do with the other ones if I get in a bind break and get shampoo and...
View Articlesp_send_dbmail truncates when attaching query results.
Installed SQL Server 2014 CU1. While testing sp_send_dbmail I noticed the query results, when attached are cut off or truncated. Max file size has been 64k -65k. I set the max file size to 104857600...
View ArticleGenerating 5min, 15min etc candlestick chart from 0 minutes data
Hi,I have the open, close, high & low prices in a table. These are 0 minutes data, Would want to generate 5min, 15 min, 30 min, 60 min, 120min, 240 min, daily etc data. the table structure is...
View ArticleIn-memory slower query
Why is the query on the "in-memory" table with the "native compiled" stored proc, slower than the equivalent on disk?Tnx.[code="sql"]USE master;-- Create databaseCREATE DATABASE InMemoryON PRIMARY(NAME...
View ArticleAnnabelle 2014 New Horror Full HD Movie Online
In 2003, Chong altogether resigned from porn, thanking her fans in a last message on her site which advertised,............
View ArticleGet the latest per one column
I have the following tableDECLARE @TABLE1 TABLE (D_ID int, C_ID int, C_HIST_ID int)INSERT INTO...
View ArticleXML intellisense broken?
In SSMS 2008R2, I can open the XML editor a number of ways. One of the easiest is to run a dummy query like this:[code="sql"]select cast('<a />' as xml)[/code]then click on the result, which...
View ArticleNeed unique number for groups of records
Hi,I'm trying to do the following and haven't been able to figure it out.Say there's a table with these records:Col1 Col2 Col3a b ca b ca b de f ge f gI want to generate a number that represents the...
View ArticleDateDiff between two consecutive rows
How can i calculate datediff (in minutes) between two consecutive rows without using CTE & Temp tables?I was using this successfully, but i need something without CTE and temp tables (both of them...
View ArticleDynamically concatenating multiple columns in a sequence
Hi Experts, I have a requirement where in I have to concatenate the fields based on their sequence given in another table along with respect to their lengths. eg.. Input 1: Table A: (below are the...
View ArticleTempDB spills on 2014 vs. no spills on 2008R2
I have two servers with exact same hardware configuration. One runs SQL 2014 and one SQL 2008R2, both Standard Edition. They each house a copy of the same database.I run the exact same query against...
View ArticleSSRS in 2014
I've looked and looked through Microsoft's site for information about what is deprecated and what is changed for SSRS in SQL Server 2014 and the information is confusing to say the least.I think it...
View ArticleStore Procedure - Perm Table
Hi,I'm very new to SQL.I have the following Stored Procedure which works as it should.I would like to move the data / findings into a perm table?The reason for this is so clients can connect to the...
View Article