Viewing 15 posts - 1,936 through 1,950 (of 3,482 total)
Interesting... Good to know! So check your indexes, then try each one...
Thanks, Scott!
May 4, 2016 at 11:30 am
The code attempts to subtract weekends, holidays...
I would do that part with a Calendar table... then you need pretty much ZERO logic for it.
WHERE Calendar.IsWeekend = False AND Calendar.IsHoliday=False...
May 4, 2016 at 11:25 am
You could... but I'd read this first:
http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/
I would have sworn that EXISTS stops as soon as a True/False changes, while an IN reads the whole table. So I would think...
May 4, 2016 at 11:12 am
If you're dealing with a star schema, you'd filter the Calendar/Date table and then the join would filter the Fact table.
SELECT ...
FROM FactTable f
INNER JOIN DimDate d
...
May 4, 2016 at 11:00 am
What if you shred the XML to a table, and index it? Then the join can use the index for the subsequent query.
May 2, 2016 at 10:21 pm
The first thing that jumps out at me is the
INNER JOIN table3 c ON CHARINDEX(c.Column,a.Column)>0
Joining on a calculated value is just terrible for performance, because you can't index the...
May 2, 2016 at 9:44 pm
Instead of showing us the code, please post some sample data showing the original structure of your table and then the desired one.
Most helpful would be if you would post...
May 2, 2016 at 2:34 pm
That VALUES trick is really handy! Absolutely going to steal that!
May 2, 2016 at 1:23 pm
Rob Collie (PowerPivotPro.com) points out which versions contain the PowerPivot features on his blog here[/url].
Thanks for confusing everyone again, Microsoft. </snark>
May 2, 2016 at 11:01 am
Yeah, I would hope so. The "documentation" was absolutely hilarious - I photocopied that page and hung it on my wall. I think I wrote "JOB SECURITY" across the...
May 2, 2016 at 10:36 am
USE tempdb;
GO
CREATE TABLE Customer (
CustomerID INT IDENTITY,
FirstName VARCHAR(15) NOT NULL,
LastName VARCHAR(20) NOT NULL
CONSTRAINT pkCustomer PRIMARY KEY (CustomerID) );
CREATE TABLE CustSite (
SiteID INT IDENTITY(100,1),
SiteName VARCHAR(10) UNIQUE NOT NULL,
RelatedCustomerID INT NOT NULL
CONSTRAINT...
May 1, 2016 at 7:04 pm
Where are you getting the frequency information from? Care to share that part?
May 1, 2016 at 12:35 am
LOL...
<insert TERRIBLE advice here> ... and don't forget to ascribe to someone who actually knows what he's talking about.
Sorry, couldn't resist!
The question reminded me of some "documentation" of a database...
April 30, 2016 at 10:57 am
This is a great discussion on triggers.
Here's the MS page on creating triggers. https://msdn.microsoft.com/en-us/library/ms189799.aspx
Edit - just looked around here and Dwain Camps wrote a great article on triggers[/url]. Definitely worth...
April 30, 2016 at 10:39 am
Welcome to SSC. Thanks for the CREATE TABLE and INSERT scripts... they're easier to use if you post them this way, though:
CREATE TABLE Employee(
EmployeeID INT PRIMARY KEY,
EmployeeName VARCHAR(20) NOT...
April 29, 2016 at 8:40 pm
Viewing 15 posts - 1,936 through 1,950 (of 3,482 total)