Viewing 15 posts - 46 through 60 (of 443 total)
fahey.jonathan (1/24/2012)
Jonathan,
Nearly but not quite, that just gets next thursday. Not the next first thursday of the month.
I misread the original post. I thought the goal was to...
January 25, 2012 at 1:52 am
fahey.jonathan (1/20/2012)
Here is an alternate version using a Tally table.
Jonathan,
Nearly but not quite, that just gets next thursday. Not the next first thursday of the month.
Here's another version loosely...
January 24, 2012 at 8:59 am
Matt,
There is however a difference I'd not spotted initially :blush: between the solutions for the 1 Feb 2012
The original solutions result is: 2 Feb 2012
Yours is: 1 Mar 2012 :w00t:
January 20, 2012 at 2:42 am
Nice one matt, I thought the original looked well overcomplicated when I saw it.
thanks
January 20, 2012 at 2:24 am
derek.colley (1/17/2012)
January 18, 2012 at 3:20 am
I see from your error message that the error is on Line 54, maybe there's something causing the issue in the other 40+ lines of your script? Can you post...
January 17, 2012 at 8:51 am
GilaMonster (1/12/2012)
... Personally I think it just drives them away ...
And it looks he's succeeded! No sign of the OP :crying:
January 13, 2012 at 8:41 am
Hugo Kornelis (1/4/2012)
The dollar and pound sign are valid in conversion from string to money or smallmoney (normally followed by the actual amount); the dot is...
January 4, 2012 at 9:43 am
A situation where the on-the-fly may be useful is when you don't know in advance what range of dates you might need, and don't want 40000+ rows (representing 1-1-1900 to...
December 14, 2011 at 2:06 am
I use a table valued function which takes two parameters, a start and end date.
It returns 1 row per day starting on the specified start date up to, but *not*...
December 13, 2011 at 3:52 am
Another option without using recursion at all:
;with Dates as (
SELECT TOP (DATEDIFF(dd,'20100101','20110101'))
CalendarDate = DATEADD(dd,ROW_NUMBER() OVER(ORDER BY (SELECT NULL))-1,'20100101')
FROM sys.columns A, sys.columns B
)
SELECT
...
December 13, 2011 at 3:31 am
dUros (12/2/2011)
I expected function like that. Is string numeric or not.
There's no need to use a while loop, it's unnecessary!
You can find non-matches in a string in one line...
December 2, 2011 at 2:00 am
Aha! I found where you hid it eventually 😀
There's no need for a loop! What's wrong with PATINDEX for this sort of thing?
SELECT PATINDEX('%[^A-Za-z0-9 ]%', 'ABC 123')
SELECT PATINDEX('%[^A-Za-z0-9 ]%', 'ABC*123')
December 1, 2011 at 8:41 am
craigB-921010 (11/18/2011)
Someone asked me what work I was doing for them this week and I said that I'd come to 'polish some turds'. 😉
Ha, excellent! 😛
Do you have a power...
November 18, 2011 at 3:18 am
Viewing 15 posts - 46 through 60 (of 443 total)