Viewing 15 posts - 601 through 615 (of 1,229 total)
SQL Kiwi (1/15/2012)
January 15, 2012 at 9:23 am
Sample data for testing:
DROP TABLE Table_1
CREATE TABLE Table_1(
RowID INT IDENTITY (1,1) PRIMARY KEY CLUSTERED,
custid INT,
store VARCHAR(9) NOT NULL,
amount INT)
INSERT INTO Table_1 (custid, store, amount) -- 2 million...
January 15, 2012 at 6:11 am
martin.david (1/15/2012)
ChrisM@home (1/15/2012)
Hi MartinBy "sequence in data" - do you mean sequence by ID?
Cheers
Hi,
i'm sorry, maybe i'm using wrong word for my problem..
sequence that i mean is same transaction that...
January 15, 2012 at 5:45 am
How many distinct stores are there in each table?
January 15, 2012 at 1:29 am
Hi Martin
By "sequence in data" - do you mean sequence by ID?
Cheers
January 15, 2012 at 1:24 am
SQL Kiwi (1/14/2012)
ChrisM@home (1/14/2012)
January 14, 2012 at 2:40 pm
Paul, have you compared the performance of this method against a rCTE yet? I must admit I should have but haven't taken the time out to do it. If I...
January 14, 2012 at 1:46 pm
SQL Kiwi (1/14/2012)
ChrisM@home (1/14/2012)
Edit: you've got a 700 million row sample data set on your home lappy? Good lord - I need an upgrade.
No, I just ran:
UPDATE STATISTICS dbo.Table_1
WITH...
January 14, 2012 at 11:01 am
Thanks Paul - looks like it's time to revisit Gail's NOT EXISTS vs etc blog 😉
Edit: you've got a 700 million row sample data set on your home lappy? Good...
January 14, 2012 at 10:44 am
In the meantime, you will get some mileage from this
SELECT custid, store, Amount
FROM Table_1 t1
WHERE NOT EXISTS (SELECT 1 FROM table_2 t2 WHERE t2.store = t1.store AND t2.product !=...
January 14, 2012 at 10:00 am
Sharon-328725 (1/12/2012)
Yes it has full text indes, but this query:SELECT Count(TBL_TOC.ID_TOC)
FROM TBL_TOC
WHERE (CONTAINS(BL_TBL_TOC.TEXT, '"test*"'))
takes 10 seconds to run...
It's a very big table with 40,000,000 records!!
Ten seconds ain't so bad.
Can...
January 14, 2012 at 9:40 am
Blimey! First post, and you've set up a ton of sample data! Top work!
I think this is what you're looking for:
SELECT
Date,
Price,
AskClient,
Dupes = COUNT(*)
FROM #trading
GROUP BY...
January 14, 2012 at 9:33 am
bicky1980 (1/13/2012)
Thanks for the reply, if there were 2 duplicate datakeys with different landline values, I would only want this to be counted as one record, as I dont want...
January 13, 2012 at 3:10 pm
bicky1980 (1/13/2012)
January 13, 2012 at 2:04 pm
Hi Bicky
Some very experienced and talented folks are having real difficulty figuring out exactly what you want here, and it looks to me that you might still be figuring it...
January 13, 2012 at 8:56 am
Viewing 15 posts - 601 through 615 (of 1,229 total)