Viewing 15 posts - 661 through 675 (of 3,957 total)
This also works, using the PatternSplitCM FUNCTION that Chris Morris contributed to the 4th article in my signature links.
with Employee as
(
select 'ABC' as Surname, 'x.yz' as...
March 13, 2014 at 8:41 pm
Luis Cazares (3/12/2014)
March 13, 2014 at 8:18 pm
Sean Lange (3/12/2014)
shan-422658 (3/12/2014)
Just a version 2 of the above query…
Surname GivenName
ABC x.yz
ABcx.y.z
ABC X.*YZ
A*.BC xyz
The...
March 13, 2014 at 8:14 pm
This takes 34 seconds to run against 3.5M account moves.
CREATE TABLE #accounts (accountId VARCHAR(10))
CREATE TABLE #accountMovs (accountId VARCHAR(10), debit INT, credit INT)
GO
INSERT INTO #accounts VALUES ('11')
INSERT INTO #accounts VALUES ('111')
INSERT...
March 13, 2014 at 7:17 pm
Perhaps this is not quite so ugly:
SELECT Style, GroupedAmendmentIDs
FROM
(
SELECT Style
,GroupedAmendmentIDs=STUFF((
...
March 13, 2014 at 6:47 pm
Greg Edwards-268690 (3/12/2014)
dwain.c (3/12/2014)
Luis Cazares (3/12/2014)
March 12, 2014 at 7:39 pm
Luis Cazares (3/12/2014)
March 12, 2014 at 6:44 pm
I'll second what Sean has said, but I wanted to add something.
It is good that you have recognized that the problem is the loops and cursors. And that a...
March 12, 2014 at 6:33 pm
Luis Cazares (3/12/2014)
The Dixie Flatline (3/12/2014)
Thanks in advance.
P.S. Please don't ask for DDL and sample data as I've already...
March 12, 2014 at 6:08 pm
mxy (3/12/2014)
Thanks for you reply that works perfect!in case if we have 10 payments (empsal, empsal1..empsal9) and dates paiddate1 through 10 what we need to do?
Did you try my solution...
March 12, 2014 at 6:06 pm
Junglee_George (3/11/2014)
dwain, great effort.can you please help me how you got idea about that the table sacn is three.
That's known by the fact that the table name appears 3 times...
March 11, 2014 at 10:50 pm
Jeff Moden (3/11/2014)
Greg Edwards-268690 (3/10/2014)
Luis Cazares (3/10/2014)
Lynn Pettis (3/10/2014)
March 11, 2014 at 7:30 pm
You're welcome.
Note to any of the other masters that take a look at this. The OP wanted a mixture of integers and dates in his output. I cannot...
March 11, 2014 at 7:26 pm
Are we getting close yet?
WITH Dates AS
(
SELECT d=CONVERT(CHAR(10), @FromDate + n, 120)
FROM
(
...
March 11, 2014 at 7:20 pm
You could do it that way but it might be faster to do it with one table scan instead of three:
SELECT StepName
FROM testdata
GROUP BY StepName
HAVING COUNT(CASE WHEN StepStatus = 'Starting'...
March 11, 2014 at 6:58 pm
Viewing 15 posts - 661 through 675 (of 3,957 total)