Query Performance Using Indexed View
Hello SQL Experts,Have one table at warehousing side which contains 100 millions of rows. Actually I succeeded to reduce performance(by adding missing indexes) with great extent in case when worst...
View ArticleRolling 12 month/Period SQL Query Logic
I want to write rolling 12 SQL query with following data , input will be FY and period no ie @FY=14, @P=3 my result should show rolling 12 months only from FY 14 3,2,1 months from year 13 -...
View ArticleWierd behavior of PARTITION BY Over clause with UNBOUNDED PRECEDING
having issue sorting this data last date for every minute of data, while last date for min is coming fine, cant make last bid qty using same method, first_value works though??Seems like a bug, any...
View ArticleHow to update the year an employee has been in a specific TITLE
--===== If the test table already exists, drop it IF OBJECT_ID('TempDB..#mytable','U') IS NOT NULL DROP TABLE #mytable--===== Create the test table with CREATE TABLE #mytable ( EMP_ID INT, Title...
View ArticleCannot deploy cube -analysis services tutorial-
0 I am a first time SQL server user trying to do the Analysis Services Tutorials. I am on the last part of Lesson 2 where the cube is deployed. Here is my error message. Note: I did have permission...
View ArticleNull instead of 0
Friends, I have a excel sheet with some data and blank columns. I have a ssis package using to import data from excel to sql table. For blank excel columns it is importing as null instead i want to...
View Articlequery help needed
I have one table that contains members, and a query which contains related records of payments made grouped by month and year. I would like to find all member records having at least one record for...
View ArticleMicrosoft SQL triggers on columns
Dear AllI have one table namely consumer with approx 50 columns.I have created one same table with audit prefix including 2 more column for action n timestamp fields.My question is that if user change...
View ArticleQuestion About online data
front end = VB.net desktop app frame work 4.0 language = VBdatabase = sql 2012 (express edition) for client end Its not web-front end its client based (windows form application)I wana give full...
View Articleconvert decimal to int in case condition
i have a table exam_setup CREATE TABLE exam_setup(setup_id INT,sub_id INT,assignment decimal(4,1),attendance decimal(4,1),INT_1 decimal(4,1),INT_2 decimal(4,1))table values are,sub_id = 75,assignment =...
View ArticleWatch out: change for line numbers in SSMS 2014
There is a change in SSMS 2014 how line numbers are displayed in error messages. Instead of displaying the raw line number from SQL Server, SSMS 2014 adds the offset where the current batch starts to...
View Articlehow to change the message text in management studio in query result
hi,I have two records...is having pid=10id pid101 10102 10103 5104 6106 5then i executed the below query..update Child set pid=10 where id in (101,102)the sql server showing message like (2 row(s)...
View ArticleAnyone Using or Planning to Use Memory-Optimized Tables?
I was just wondering if this feature will be used in the real world.Not being able to have identity columns and foreign key constraints looks like a major drawback, so I wonder if it will be used for...
View ArticleAdjacency Matrix in MDS with a recursive derived hierarchy? Anyone tried this?
I'm working through a problem in MDS and I'm curious to see if anyone else has run into this.If you've ever worked with CI (UPC barcodes), certain commercially distributed products can be "packaged" in...
View ArticleChanged behavior or am I missing something?
Hi all,when porting and testing code from 2008/2012 to 2014 I noticed that some queries where significantly slower. Digging into it, I found that there is what seems to me a different behavior between...
View ArticleHekaton - Origin
Hi all, Someone knows the origin of the name "hekaton" because in previous editions the name was based mountains.Thanks.
View ArticleCan you count columns from sys.partition table, if not is select count(1) the...
Can you count columns from a variation of the following query ? set statistics time onSELECTOBJECT_SCHEMA_NAME(object_id) as dbo,OBJECT_NAME(object_id) as rows,SUM(Rows) AS NumOfRows --sum the rows if...
View ArticleSelecting Records Based on Date
So let's say I have a table Orders with columns: Order# and ReceiptDate. Order#'s may be duplicated (Could have same Order# with different ReceiptDate). I want to select Order#'s that go back 6 months...
View Article“LOGIN FAILED FOR USER ‘NT AUTHORITY\ANONYMOUS LOGON’” WHEN YOU RUN AN SSIS...
i researched my issue and found the below link. I don't want to use a sql job. I'd rather now hard code the sql login the in the proc either. Does anyone know if this issue has been addressed by...
View Article