Viewing 15 posts - 736 through 750 (of 3,957 total)
I'm going to go out on a limb here since I am not an "SSIS guy" either and say that if you can use DelimitedSplit8K you can also use PatternSplitCM...
February 25, 2014 at 5:14 pm
Sounds like you want a rolling 3 quarters total, is that right?
Various methods exist and this article compares the performance you can expect:
February 25, 2014 at 5:09 pm
"The general technique for transforming a Uniform Random Number (URN) into a non-uniform random number (NURN) is to multiply the URN by the inverse of the cumulative distribution function (CDF)...
February 25, 2014 at 5:04 pm
Something like this might also work:
WITH Tally(n) AS
(
SELECT 0 UNION ALL
SELECT TOP (SELECT MAX(DATEDIFF(day, FROM_DATE, TO_DATE)) FROM #dates)
...
February 24, 2014 at 10:09 pm
AronB (2/24/2014)
Your solution reminded me of this SQL Spackle article from Jeff Moden.http://www.sqlservercentral.com/articles/T-SQL/71511/%5B/url%5D
It could very well be that that is where I remembered this from.
February 24, 2014 at 5:44 pm
Not to be casting aspersions on Jeff's fine solution mind you, but I'd probably do it something like this:
WITH PreAggregate AS
(
SELECT OrderNo, SubTotal = SUM(Amount)
...
February 23, 2014 at 6:56 pm
I think I said in the article that ROW_NUMBER() and the other ranking functions are all good performing options over trying to code the same thing yourself a different way.
I...
February 23, 2014 at 6:22 pm
Perhaps something like this might work for you:
SELECT t1.id,name
FROM table1 t1
INNER JOIN table t2 ON t1.id=t2.pid
INNER JOIN table3 t3 on t1.id=CASE type WHEN 'A' THEN t3.id ELSE t1.id...
February 23, 2014 at 6:14 pm
Perhaps this?
WITH SampleData (UniqID, UniqClient,PhoneNumber,EmailWeb) AS
(
SELECT 3, 66,'4164445555','' UNION ALL SELECT 5, 66,'','fstest1@test.com'
)
SELECT UniqClient, PhoneNumber=MAX(PhoneNumber), EmailWeb=MAX(EmailWeb)
FROM SampleData
GROUP BY UniqClient;
February 23, 2014 at 6:02 pm
Why not just do it like this?
WITH SampleData (Date_Month) AS
(
SELECT 'APR 2012'
UNION ALL SELECT 'JAN 2012'
UNION ALL...
February 23, 2014 at 5:52 pm
SQLRNNR (2/20/2014)
dwain.c (2/20/2014)
SQLRNNR (2/20/2014)
Well done Dwain!!What do you think of the new thought question in my signature links?
Yes, I have been told that many times. They always want things...
February 20, 2014 at 11:59 pm
SQLRNNR (2/20/2014)
Well done Dwain!!
Thanks! I worked pretty hard for that "Worked for the OP" stamp.
What do you think of the new thought question in my signature links?
February 20, 2014 at 11:50 pm
zulfansari (2/20/2014)
I did change the 9 to 3 and it's working beautifully 🙂
How about if I want to see the...
February 20, 2014 at 10:59 pm
zulfansari (2/20/2014)
Now, not changing the requirements and trust me I tried to follow your last script but it's a little too much to digest right away, I know I will...
February 20, 2014 at 10:32 pm
zulfansari (2/20/2014)
I would like to apologize and say that I didn't mean to say it the way it came out, I know you guys are here to help everyone...
February 20, 2014 at 9:16 pm
Viewing 15 posts - 736 through 750 (of 3,957 total)