Viewing 15 posts - 2,431 through 2,445 (of 8,731 total)
J Livingston SQL (7/26/2016)
well you could always do it online at http://poorsql.com/...maybe a few more key strokes ( cut and paste ) but if its important what the heck 🙂
I...
July 26, 2016 at 11:55 am
Just a small correction to J Livingston's query to avoid scanning the whole table.
SELECT
Custmer,
location,
SUM(CASE WHEN [Date] >= @mth_st...
July 26, 2016 at 7:22 am
djj (7/26/2016)
TomThomson (7/24/2016)
Jeff Moden (7/24/2016)
Hugo Kornelis (7/22/2016)
Ed Wagner (7/22/2016)
djj (7/22/2016)
whereisSQL? (7/22/2016)
crookj (7/22/2016)
Ed Wagner (7/22/2016)
Luis Cazares (7/22/2016)
Grumpy DBA (7/22/2016)
Revenant (7/22/2016)
Ed Wagner (7/22/2016)
Luis Cazares (7/22/2016)
crookj (7/22/2016)
RedBlue
Sky
Rainbow
Pot o' gold
leprechaun
Irish
Pub
Brawl
Fisticuff
Fight
That will give you the...
July 26, 2016 at 6:20 am
It's actually a leftover from when I had to process the whole table at once. It's taking the GroupID value from the parent node and comparing it each child to...
July 26, 2016 at 6:19 am
ah0996 (7/25/2016)
I need help with my CTE; All I need to find is the match between groupID and memberID and set nodelevel; once the result is...
July 25, 2016 at 1:18 pm
lynns (7/25/2016)
July 25, 2016 at 1:11 pm
Double hyphens define a single line comment. Everything to the right of them will be ignored.
--This is a single-line comment
/*
This is
a multi-line
comment
*/
July 25, 2016 at 12:59 pm
drew.allen (7/25/2016)
WHERE CAST(DateCol AS DATE) = CAST(DATEADD(DAY, -1, GETDATE()) AS DATE)
Since CASTing from DATETIME to DATE is still SARGable,...
July 25, 2016 at 12:50 pm
What are you using the product_stat table for? Will you have more than a row per product? Will it keep history? If it'll always show the products in orders, maybe...
July 25, 2016 at 12:47 pm
CREATE TABLE #SampleDuplicates(
A int,
B varchar(10),
C varchar(10),
D ...
July 25, 2016 at 11:03 am
You have 2 variables named @res. One inside the dynamic code, and one outside. The one inside the dynamic code is lost and the one outside is printed but never...
July 25, 2016 at 9:38 am
Alan.B (7/25/2016)
Maybe it's Monday a Monday morning thing but even the small things are annoying me today. Just ran accross this:
[Gender] varchar(100) NULL,
It's obviously meant to include the whole gender...
July 25, 2016 at 9:21 am
If a daily backup is enough for this database, I'd suggest to change the recovery mode to simple. Be sure that you don't have any uncommitted transactions that would prevent...
July 25, 2016 at 8:48 am
You're missing the begin and a different set of begin...end. You're also missing the commit transaction. You're also using the slow option.
BEGIN TRANSACTION;
IF EXISTS(SELECT * FROM db1.dbo.Jobs where status in...
July 25, 2016 at 8:32 am
Viewing 15 posts - 2,431 through 2,445 (of 8,731 total)