Viewing 15 posts - 61 through 75 (of 388 total)
liver.larson (10/11/2013)
Is there any way to structure the shortcut so you don't have to wrap the parameter in ' ', so I could just highlight my database.schema.objectname and...
October 15, 2013 at 1:03 am
Micha-1016108 (10/10/2013)
WHY do you have posted this not 5 years ago!!
BUT I always get an Error when I marked for example schema.tablename and press...
October 10, 2013 at 9:39 am
I like it -> 5 stars from me. Nice idea, and easily extensible. I'm not sure I'd have gone for the dynamic sql...I'd have left it to the...
October 10, 2013 at 4:42 am
Have a play with the code below. The other columns aren't really a problem...you can just include them.
I'm sure this could be done a lot more concisely, but this...
August 27, 2013 at 6:49 am
For more on the xml approach, check out this article (the url is for part 2, but part 1 will give you the introduction.)
August 22, 2013 at 9:40 am
This is cosmetic, but all these nested subselects could be tidied up with a few inner joins
Thus we would replace
-----------
and T3689065.serial not in (
...
August 22, 2013 at 8:04 am
I do use sql quite frequently for generating code. But I also use excel, where I put into the first column my template sql with tokens for the variables...
August 22, 2013 at 7:46 am
Yep. For single rows, that will work just fine. Try your code with a GROUP BY and a SUM on the Sale column and see what happens. 😉
...below...
August 13, 2013 at 8:40 am
-- another method, this time with datediff. (don't think it was covered before....apologies if it was.)
SELECT Created_Date, DATENAME(mm,Created_Date), Sale
FROM
(
SELECT Created_Date = '2012-12-01', Sale = 10000
UNION
SELECT Created_Date = '2012-02-01', Sale...
August 13, 2013 at 12:28 am
Jeff,
Before my post, I did in fact (quickly) read through all the comments...and the month function was mentioned a number of times already. I didn't see any added value...
August 2, 2013 at 8:19 am
Chris,
Are we reading the same article, or have you got a premium subscription? 😉
But how do you display just the month name? Most people end up making a scalar function...
August 2, 2013 at 4:37 am
Hi Jeff,
As regards why the article got marked down, I'd suggest that it's because you didn't mention the obvious solution.
You want to sort by the month number; In...
August 2, 2013 at 1:01 am
This better explains the question than I could
https://www.simple-talk.com/sql/sql-tools/sql-server-partitioning-without-enterprise-edition/[/url]
July 24, 2013 at 9:18 am
(I'm talking here about a partitioned view rather than a partition scheme, which came more recently.)
I'm very rusty on this, as it's a number of years since I've used this,...
July 24, 2013 at 9:12 am
I reckon that you should put contiguous check constraints on the date field in each table, as if you were doing a real partitioned table. Can't do any harm,...
July 24, 2013 at 8:29 am
Viewing 15 posts - 61 through 75 (of 388 total)