SSRS: Multiple Column Groups with the same Group By, each filtered to ensure...
Hi All,Anyone done multiple column groups before? Looking for any kind of gotcha's to watch out for, because I've just run into a problem where I have a 1st column group with a total, and now a 2nd...
View ArticleJoining tables using OR condition
I am told that i need to joinSelect * from Table ALeft Join Table Bon A.part OR A.part2 = B.PartCan i do that? having a challenge doing it.thanks, as always
View ArticleParsing First and Last Names from Full Name
Hi there! I have this code:[code language="sql"]SELECTCASE WHEN CHARINDEX(' ',name) = 0 THEN name WHEN CHARINDEX(' ',name) = PATI
View ArticleSQL default value for next Monday
I am using sql server through Visual Studio. I would like to set the default value of a column to next Monday. What do I put in the default column? Regards
View ArticleSQL Profler trace related
I am trying to troubleshoot and application issue. In the Database VM that we are using, has several databases.
View ArticleHealthcare / Medical sample database?
Does anyone know of an "AdventureWorks-esque" sample database for the heatlhcare, health insurance or medical industries? I'm currently unemployed, and have plenty of experience looking at...
View ArticleSSIS Package Foreach Loop Container not finding files when deployed (fine in...
Hi there, I have a SSIS 2014 package using the Project Deployment model and parameters. I have a project parameter called FlatFilePath which is the path to a folder where a bunch of text files are. I...
View ArticleCase when inside of partition by?
Hi, I have the following situation:[code language="sql"]CREATE TABLE #TAB1( ID INT,MY_STATE VARCHAR(10),EVENT_TS DATETIME)INSERT INTO #TAB1(ID, MY_STATE, EVENT_TS)
View ArticleGive integer value to column based on sort
I want to write a sql statement to achieve the following and need some help.I need to give a sequential integer (starting from 1) to a column in the database table (column called Prioriteit) based on a...
View Articlepoor performing report query against table without a PK
The table is practically a heap because its' clustered index is on a column that allows NULLs, and there are hundreds of thousands of NULLs. Whenever I run my query the execution plan shows that the...
View ArticleInquiry about joining tables
Hi All,Is there any difference between joining tables using inner join or specifying the join conditions after the where clause.Example:select column1,column2 from table1 inner join table2 on...
View Articlesql performance question
Hi All, Recently, I have undergone a computer based exam where in they asked below question.Need some inputs from experts.Below correlated query is causing performance issue. Please explai
View Articlepredicting load on server for report query
What questions do I need to ask the business when preparing an table and query against which a report query will be running: ie. usage patterns (number of users, frequency of report usage, and peak...
View ArticleUpdate only year
Hi ya,I have a scenario where date column data type is nvarchar and year is not entered correctly. I want to update the year correctly can you please help me?20-02-000216-05-000121-01-0015Expected...
View ArticlePass Table Name by joining Constant String and A Field Value from Same Row
I have two tables in this query.[code language="sql"]SELECT [pID],[pName],(SELECT COUNT([tableProfileID]) AS COUNT_RECORDS
View ArticleNeed index suggestion
Hi All, Need index suggestion for the below query which can improve the performance. (Assume that table has enough data)SELECT SalesDate, SalesPersonID FROM dbo.Sales WHERE ProductID='PD1’ Order by...
View ArticleInquiry about table design
Hi All,I have a table which is supposed to save in one of it's field, huge amount of text data like a document.The current table design for this column is ntext which according to my knowledge will be...
View ArticleInquiry about saving formatted data
Hi All,I need to save formatted (bold,italic,fonts,colors, etc.)html documents to a table in database, my concern is i don't want to save all the parts related to html which will increase the record...
View Article