Viewing 15 posts - 586 through 600 (of 4,085 total)
As Jo said, use some variation on a calendar table. (Since your ranges all start on month starts and end on month ends, it easy. If that's not actually the...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 22, 2019 at 10:23 am
That's entirely too vague to give you any meaningful answer. Generally it is best to use a set-based approach where possible, but you haven't given us any information about how...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 22, 2019 at 9:45 am
Part of the problem is that your UDF is a scalar function (not a table-valued function) given the way that you are calling it. I've substituted a Table Value Constructor...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 22, 2019 at 9:06 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 2:54 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 2:28 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 11:47 am
You say that the central line depends on the trend, but you have two trends, and you don't specify which trend it depends on. Furthermore, I don't see any variation...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 10:00 am
ALTER TABLE <Table_Name>DROP CONSTRAINT <constraint_name>
--Then alter...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 9:39 am
This link shows you how to handle the PRIMARY KEY.
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 9:34 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 9:25 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 9:13 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 21, 2019 at 8:28 am
This is a standard gaps and islands problem. If you post CONSUMABLE data (as in the first link in my signature) we can help you with this query. J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 20, 2019 at 12:56 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 20, 2019 at 12:46 pm
IF OBJECT_ID('tempdb..#Hospital') IS NOT NULL DROP TABLE #Hospital;
Create table #Hospital ( mem VARCHAR(100)...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
March 19, 2019 at 3:40 pm
Viewing 15 posts - 586 through 600 (of 4,085 total)