Script to find views which has more than 16 columns for unique...
Hi, we are on SQL 2014...we have a bunch of views in a database where we are trying to find the views which have more than 16 columns max for unique index/constraint...this is needed so we can convert...
View ArticleBuilding a tree view using t-sql
This one has got me stumped, I have a solution ready but I am sure it can be done a lot better. The good news is that there wont be more than 5 sub levels , the bad news is seq is not the seq within...
View ArticleNeed output in single row
Hi All,I need out put in single row for below 2 queries using joinsSELECT [total_physical_memory_kb] / 1024 AS [Total_Physical_Memory_In_MB],CPU_Count AS NumberofCPUFROM...
View ArticleNULL and empty string question...
I have always (or at least intended to) treat NULL and empty strings separately in my SQL querying history. Now I have run across something that mystifies me (but probably shouldn't) that I would like...
View ArticleProject deploy mode vs Package deploy mode
We are upgrading our SQL server 2008 R2 to SQL server 2014.We have about 10 packages in 4 solutions.And we have been using configuration file and save packages in the [b]file system [/b](not msdn) for...
View ArticlePlease help me with comparing two rows values.
Hi Team, Can you please help with below query.I need to compare two consecutive rows (if BEGDA of second row is 1 day greater than ENDDA of first row then I need to pick First row BEGDA and 2nd row...
View ArticleSplit time span into multiple records
Having a problem finding a solution for the following issue:I have a table that includes the fields below:ID - INTMachine - TINYINTStartTime - DATETIMEEndTime - DATETIMEWhat I am trying to do is figure...
View ArticleSSIS failing - Visual Studio Shell
Hi,Wonder if someone can help?I had a SSIS project created and saved on a SQL 2014 server.This was being called via an agent job and all was running fine.The project was created using Visual Studio...
View ArticleNo process is on the other end of the pipe
I have been trying to install SQL Server 2016 CTP for some time, but I keep getting the same error message:A connection was successfully established with the server, but then an error occurred during...
View ArticlePlease help me with first day of month value
Hallo,I have a table as below.Timestamp SourceId ChannelId Value2015-11-01 16:45:59.953 1 1 223,49232015-11-01 16:46:00.127 1 2 224,9357 *2015-11-01 16:46:00.327 1 3 227,4183 *2015-11-01 16:46:00.527 1...
View Articlesp_executesql, dynamic sql, and openrowset: parameters not being replaced by...
Ok, I have some stored procedures that are using EXEC and I am updating them to use sp_executesql instead.In the same proc, I've tested just a straight simple sql command with one param inside the...
View Articlexml path approach for appending rows horizontally...
Hi, I'm trying to append rows horizontally - I'm using the "xml path" approach SELECT E.[USER_NAME] As 'User Name', ( SELECT ',' + C.[PERMISSION_NAME] FOR XML PATH('') ) As [Associated Groups]FROM...
View ArticleUPDATE with OUTPUT CLAUSE
Is it possible to pivot the output data into multiple rows?I wanted one row for deleted data and another row for Inserted data, I was lookingat UNION ALL and CROSS APPLY but to no avail.I just wonder...
View ArticleSSMS Help system buggy ?
I keep my help "local" vs. "online".However, in my developer edition of SSMS (2014), I constantly get "cannot find requested content on your computer".However, in my Help Library Manager it says:Books...
View ArticleMy battle to query XML continues - Can you help?
Hi all,It's official, me and XML don't get on, at least not when I have to query it. So I'm after a bit of help please. I've attached a zip file which contains a SQL scriptto declare a table variable,...
View ArticleTricky Problem with Group by Clause
Hi All, I have trapped with below problem, which am facing this issue from last 4 days, below is my table: CSATEQID Revis FileName Jobcode Jobqal Material1 1 Mick 1 A 101 1 Mick 2 B 201 1 Mick 3 C 301...
View Articleextracting data from SQL database
Hi,I am new to the SQL world, and it's a pleasure to meet you.I am running an hotel application for all the bookings.I would like to get all the data of all the guests that stayed in the hotel (name,...
View ArticleCan't find the Data Flow Task in SSDT 2012
I Can't find the Data Flow Task in SSDT 2012.Has it been replaced by another task or do I need to do something to make it visible?Edit: It popped up under my favorite tasks.
View ArticleSSAS Tabular 2014 Beginning of Period Measures
I am a new user of SSAS that has had no training as of yet. I've managed to cobble together one model, but I'm having trouble with my second. What I would like to do is use calculation from one period...
View ArticleDatawarehouse Denormalization
Hi,I Have a table which I've de-normalized for my DimDestinationLocations. see Below[img]https://www.dropbox.com/s/le7958pr1yw37ew/DimLocations.jpg?dl=0[/img]How ever due to the amount of potential...
View Article