Viewing 15 posts - 46 through 60 (of 422 total)
While developing this function several alternative versions were suggested and tested. Each version seems to have its pros and cons. The posted version limits the lower-bound to > 0. To...
July 23, 2013 at 9:35 am
Yeah, I suppose I can over-complicate things at times. 😛
There's so many ways to do this stuff that it's easy to get lost in the pursuit.
July 23, 2013 at 12:09 am
I think this would still work for you. But the important point is to take a look at the article link I posted and learn how to use DelimitedSplit8K. That...
July 23, 2013 at 12:04 am
See http://www.sqlservercentral.com/articles/Tally+Table/72993/[/url]
to get the code and explanation for use of the DelimitedSplit8K function.
;WITH SampleData (ID,PartNumber)
AS
(
SELECT 1,'BR643-0034-344-34' UNION...
July 22, 2013 at 10:59 pm
--this date MAY or MAY NOT be valid depending on the DATEFORMAT setting
SELECT ISDATE('29-12-2013')
--this is never valid (out-of-range)
SELECT ISDATE('32-12-2013')
--this should always be valid in all formats
SELECT ISDATE('2013-01-08 15:44:12.208')
--this...
July 22, 2013 at 12:37 pm
ISDATE may give different results depending on the datetime datatype (DATE vs DATETIME vs DATETIME2, etc.). The best and surest method to validate a date-like string as a date is...
July 22, 2013 at 9:41 am
Jeff, I'm glad this discussion was resurrected since I missed it the first time around. I too was not aware of the sys.syslanguages table! There have been a few occasions...
July 19, 2013 at 4:30 pm
July 18, 2013 at 1:48 pm
An alternative solution...
;WITH cteJune ([level],[SthdiCode],[FunctionalArea],[Qty])
AS
(
SELECT '01','G22','Area1',5 UNION ALL
...
July 18, 2013 at 12:04 pm
You can pad the string values for proper sorting using the REPLICATE operator.
For example:
DECLARE @val VARCHAR(10)
SET @val = '2609'
DECLARE @t...
July 18, 2013 at 11:33 am
You can't do it directly with any ALTER statement that I know of.
But you can do something like this even if it is a bit convoluted:
-- Test data
IF OBJECT_ID('tempdb..#TempTable')...
July 18, 2013 at 11:09 am
Well, I'm not sure if these totals are correct but here's another stab at it...I made some significant additions to the opening balance columns (actually one for each year). It's...
July 17, 2013 at 8:28 pm
A simple join seems to do the trick as well. It seems that I get TWO orders that meet the required condition though. Maybe you are just looking for the...
July 17, 2013 at 7:51 pm
This might be a good suite of products to look into. Very solid and professional and used by many large enterprises with hundreds of servers. Free trial downloads available and...
July 17, 2013 at 7:13 pm
elee1969 (7/17/2013)
sdevanny (7/17/2013)
July 17, 2013 at 7:03 pm
Viewing 15 posts - 46 through 60 (of 422 total)