Viewing 15 posts - 49,006 through 49,020 (of 59,099 total)
Chris Morris (8/1/2008)
Here's a script for creating a Numbers or Tally table, which you will see often on this forum.
IF...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 9:55 pm
With the advent of VARCHAR(MAX), there's just no need for cursors anymore... for example...
DECLARE @sql VARCHAR(MAX)
SELECT @sql = COALESCE(@SQL+CHAR(10)+' UNION ALL --------------------'+CHAR(10),'')
+REPLACE(
' SELECT '' '' AS...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 9:46 pm
KMM (8/1/2008)
I'm using Sql Server 2005I got the idea of converting my cursor into a CTE from this website:
Nah... don't bother changing it if you're just going to use recurrsion....
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 9:15 pm
As Ryan suggested, you should consider NOT storing delimited data in a single column...
If it's not something you can control, then Vaseem was on the right track. Even with...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 9:07 pm
Simple test proves it...
SELECT 1, CAST(1.23 AS DECIMAL(5,2))
SELECT 2, CAST(12.34 AS DECIMAL(5,2))
SELECT 3, CAST(123.45 AS DECIMAL(5,2))
SELECT 4, CAST(1234.56 AS DECIMAL(5,2))
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:54 pm
Sure... but the methods are all worse than using profiler... why the profiler phobia?
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:40 pm
s_chilkury (8/1/2008)
I want this to be resolved using DTS only.
Why?
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:19 pm
gtobee (7/25/2008)
looking to see if anyone is running a 10T MS SQL database.
Why? What's the problem?
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:17 pm
Heh... c'mon now... {clutching sides in laughter... almost fell out of chair}, that developer is doing the best (s)he can...
Thanks for the Friday laugh...
Steve, you should start a...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:14 pm
This is why we always ask for a description of what you're trying to do... are you trying to generate 12 otherwise identical rows for each employee or ???
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 8:09 pm
Matt Miller (8/1/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 7:51 pm
MichaelC (8/1/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 7:22 pm
Jonathan Kehayias (8/1/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 7:19 pm
michael.agarwal (8/1/2008)
There are 10 stacks of coins. Each stack contains 10 coins. All coins look same. All coins weigh 0.1 lb in 9 stacks but in one...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 6:28 pm
Sean Peters (7/31/2008)
No IsNumeric('11,22,33') = 1
Ummm... nope... it isn't...
SELECT ISNUMERIC('11,22,33')
-----------
0
(1 row(s) affected)
I will agree, though, that...
--Jeff Moden
Change is inevitable... Change for the better is not.
August 1, 2008 at 6:21 pm
Viewing 15 posts - 49,006 through 49,020 (of 59,099 total)