Viewing 15 posts - 946 through 960 (of 1,246 total)
Give this a shot...
IF OBJECT_ID('tempdb..#MgtStructure', 'U') IS NOT NULL
DROP TABLE #MgtStructure;
CREATE TABLE #MgtStructure (
EmployeeID CHAR(1),
ManagerID CHAR(1)
);
INSERT#MgtStructure (ManagerID, EmployeeID) VALUES
('A', 'B'),
('A', 'C'),
('A', 'D'),
('B', 'C'),
('D', 'E'),
('F', 'G'),
('F', 'K'),
('H', 'I'),
('H', 'J'),
('H', 'A');
WITH...
December 15, 2015 at 12:11 pm
Please post consumable sample test data from the CAD table... So that we have something to test with.
December 12, 2015 at 12:55 pm
sql84 (12/10/2015)
if I select only 200 columns it takes half the time it took for 400 columns. so is this just a data volume issue?
Yes. Your query isn't doing anything...
December 10, 2015 at 5:27 pm
sql84 (12/10/2015)
12 months would return about 1 million rows.(stated in the original post)the stat is from direct database query (SSMS) not from the application.
Jacob Wilkins (12/10/2015)
December 10, 2015 at 5:08 pm
sql84 (12/10/2015)
the only purpose of this table to be used by a reporting tool. this table is refreshed(dropped and recreated)...
December 10, 2015 at 3:53 pm
Dee Dee-422077 (12/9/2015)
December 9, 2015 at 10:03 pm
Raul Undreiner (12/9/2015)
I have a table with about a million rows. There is a category column with around 20 different values. How can I produce a sample extract of...
December 9, 2015 at 9:53 pm
If I were a betting man, I'd put my $$$ on Jacob being correct... Lazy/sloppy coding can & will come back to bite you in some pretty surprising ways.
December 7, 2015 at 9:22 pm
Just for the fun of it, here's another...
IF OBJECT_ID('tempdb..#T1','U') IS NOT NULL
DROP TABLE #T1;
CREATE TABLE #T1 (GoodId INT,LocNum INT);
INSERT#T1 (GoodId,LocNum) VALUES (1,500), (1,501), (1,502), (2,501),
(2,502), (3,500), (3,502), (4,500), (4,501),...
December 7, 2015 at 6:41 am
It's probably worth mentioning that the CAST/CONVERT in the predicate only works when using certain datatypes.
Casting a DATETIME (and apparently FLOAT) to DATE will allow a seek but casting a...
December 6, 2015 at 7:20 pm
Orlando Colamatteo (12/4/2015)
December 6, 2015 at 1:37 pm
You'll note that the vast majority of the expense of the function above is tied to a sort operation (90%). This can be alleviated by adding a persisted computed column...
December 6, 2015 at 1:31 pm
Something like this perhaps???
CREATE FUNCTION dbo.tfn_LikeColour
(
@Value VARCHAR(8000)
)
RETURNS TABLE WITH SCHEMABINDING AS
RETURN
WITH ColourList AS ( -- replace this section with your Colour table when the time comes.
SELECT
x.Colour
FROM
( VALUES...
December 6, 2015 at 1:03 pm
Sorry... Missed the requirement to to include Location in the partitioning.
Try the following...
IF OBJECT_ID('tempdb..#Dates', 'U') IS NOT NULL
DROP TABLE #Dates;
CREATE TABLE #Dates (
WeekendDate DATE
);
INSERT #Dates (WeekendDate) VALUES
('11/01/2015'),
('11/08/2015'),
('11/15/2015'),
('11/22/2015'),
('11/29/2015');
IF OBJECT_ID('tempdb..#Product',...
December 6, 2015 at 9:16 am
adhikari707 (12/4/2015)
Thanks Jason , i will try this and let you know about the results🙂
No problem. Keep us posted. 🙂
December 5, 2015 at 6:39 am
Viewing 15 posts - 946 through 960 (of 1,246 total)