Viewing 15 posts - 181 through 195 (of 476 total)
Steve Jones - SSC Editor (2/19/2014)
February 19, 2014 at 7:19 pm
sqldriver (2/17/2014)
mickyT (2/16/2014)
I've never compared my processes against a power shell equivalent (or anything else for that matter:-)), but I have some large text files (around 1.5 GB) that I...
February 17, 2014 at 10:48 am
Hi
I've never compared my processes against a power shell equivalent (or anything else for that matter:-)), but I have some large text files (around 1.5 GB) that I pre-process before...
February 16, 2014 at 6:03 pm
Another option ... though without some sample data it is difficult to test
select c.dbpatid
,case when c.LdgAmt = t.LedgerAmount then 1 else 0 end as Paid
from (select dbpatid, sum(LdgAmt) LdgAmt from...
February 16, 2014 at 5:29 pm
Hi
If I have understood your requirements correctly, this should do what you want
SELECT Symbol,
ExpDate,
CASE
WHEN expdate = '2014-03'
AND COUNT(*) OVER (PARTITION BY Symbol) > 1
THEN 1
ELSE 0...
February 13, 2014 at 11:49 am
oliveraustin (1/28/2014)
Since the Roles with multiple groups consist of<=12 groups and the rest of the all I...
January 28, 2014 at 7:36 pm
Hi
The culprit would be the join condition in the update clause. This will return both splits for prices past Mar 2013 because of the >= operator. If you...
January 22, 2014 at 4:00 pm
I'll try and have another look at this tomorrow and thinking about it, the tally tables should have at least (14 * 12) 168 rows in it for this...
January 21, 2014 at 10:19 pm
OK I set up the following as a test
CREATE TABLE #InventoryTran (
IntLotKey INT NOT NULL,
IntTranDate DATE,
IntTranQty INT
)
INSERT INTO #InventoryTran
SELECT TOP 100000
IntLotKey = FLOOR(RAND(CAST(NEWID() AS VARBINARY)) * 30000)
,IntTranDate =
CAST(2000...
January 21, 2014 at 8:08 pm
dwain.c (1/21/2014)
mickyT (1/21/2014)
gcresse (1/21/2014)
January 21, 2014 at 7:11 pm
gcresse (1/21/2014)
Fantastic! I have never used ROWS UNBOUNDED PRECEDING but I'm going to start reading up on that functionality. Very useful.Thanks, again!
Gina
Here's a link:-) http://technet.microsoft.com/en-us/library/ms189461.aspx
January 21, 2014 at 4:00 pm
gcresse (1/21/2014)
January 21, 2014 at 3:55 pm
You're welcome
January 21, 2014 at 2:58 pm
I've made a small change to handle the summing of multiple values in a month
WITH cteSmallTally AS (
SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) - 1 N
FROM (VALUES (0),(0),(0),(0),(0),(0),(0),(0),(0),(0)) E1(N)
,(VALUES...
January 21, 2014 at 2:18 pm
I've had a go at this using the new windowing options in 2012 to do the running total.
I'm not sure what the performance of this will be like with larger...
January 21, 2014 at 1:37 pm
Viewing 15 posts - 181 through 195 (of 476 total)