Viewing 15 posts - 376 through 390 (of 1,082 total)
Here is some code that does delimiting:
DECLARE @String VARCHAR(100)
DECLARE @Delimiter VARCHAR(2)
SELECT
@String = 'NE, SE, NW, SW, MA',
@Delimiter = ', '
SELECT SUBSTRING(@String+@Delimiter, n,
CHARINDEX(@Delimiter, @String+@Delimiter, n) - n)
FROM tally
WHERE n...
February 11, 2009 at 6:36 am
Wow I didn't realise some folks where looking for a good pivot example 🙂
February 10, 2009 at 9:50 am
if it's an SSIS I would check to see that perhaps the data doesn't start unpivoted and then is actually pivot for the results.
If this is the case then you...
February 10, 2009 at 9:39 am
indeed if your index clustered then it's prob not a good idea I agree...
To be honest I'm not 100% where I learn't this but I could point to Gail's blog.
She...
February 10, 2009 at 8:44 am
glad I could help 🙂
February 10, 2009 at 8:39 am
ok thing I found a solution. not sure how fast it will be but give it a go.
DECLARE @tbl TABLE
(ID INT IDENTITY(1,1),
VAL1 INT,VAL2 INT,VAL3 INT,VAL4 INT,VAL5 INT)
INSERT INTO @tbl
SELECT 21,7,16,44,9...
February 10, 2009 at 8:33 am
thats understandable.
Ok firstly why would you avoid composite indexes?
It's one of the great tools available for performance on tables with regards to creating useful indexes for the optimizer to create...
February 10, 2009 at 8:26 am
could you show us the output for that example table please
February 10, 2009 at 8:22 am
I think Jack is talking about creating two composite indexes, each containing two columns.
Looks like his suggestion would help you JOIN critea!
Please could you attach the query plain as a...
February 10, 2009 at 8:18 am
check for thats that are leap years but in a year that is not a leap year
February 10, 2009 at 8:05 am
Please ref to my example that I posted with the test data.
Simply change the table names and the column names...
February 10, 2009 at 7:47 am
DECLARE @tbl1 TABLe
(Id INT,
Name VARCHAR(100))
INSERT INTO @tbl1
SELECt 1,'soemthing here' UNION ALL
SELECT 2,'antoher here' UNION ALL
SELECT 3,'should have 0 count'
DECLARE @tbl2 TABLE
(id int,
Col2 VARCHAR(10))
INSERT INTO @tbl2
SELECT 1,'a' UNION ALL
SELECT 1,'a' UNION...
February 10, 2009 at 6:38 am
First I'm not sure why you hae those joins if there are no conditions or fields being returned?
But you gonna want a left join to start with then put the...
February 10, 2009 at 6:34 am
More reason for us to understand what fixed this, for future users
February 9, 2009 at 8:23 am
Viewing 15 posts - 376 through 390 (of 1,082 total)