Viewing 15 posts - 40,066 through 40,080 (of 59,098 total)
What would really be cool is to see the email or letter from the person(s) that nominated these folks. Let's see what they have to say about their exceptional...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 10:09 pm
MANU-J. (1/29/2010)
DECLARE @tbl TABLE
(
RowText varchar(max)
)
INSERT INTO @tbl
exec sp_helptext 'dbo.test1'
DECLARE @sp-2 varchar(max)
SELECT @sp-2 = ISNULL(@sp, '') + RowText
FROM @tbl
SET @sp-2 = REPLACE(@sp, 'AS', '/****************************
SQL2008...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:50 pm
I forgot about that and that's very true. Have you ever seen code that does that, though?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:42 pm
Unless a table is nothing more than a temp table, I put clustered indexes on all tables as a matter of rote. That way, I don't have to worry...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:40 pm
san43 (1/29/2010)
Also is it possible that data is more fragmented in production which is causing the slowness, if so how can I find out that?
My apologies... I missed that part....
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:34 pm
As some have already stated, the optimizer thinks all Table Variables only have one row and, therefor, may not pick the best execution plan when the data finally reaches what...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:29 pm
rpatil22 (1/29/2010)
I have a data in table
Heh... but we don't. We have text on a page and would have to spend a bit of time turning it into data...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:19 pm
Another way to skin the same cat except this looks a little cleaner...
SELECT ID, StartTime, StartTime + '00:59:59' AS EndTime, AVG(Produced) AS HourlyAverage
FROM (
...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 9:05 pm
You can cheat the hell out of this one, BaldingLoopMan... 🙂
Using your good test data setup...
SELECT ID,
DATEADD(hh,DATEDIFF(hh,0,UtcTd),0) AS StartTime,
...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 8:57 pm
Hopefully, you ended up with something like this...
SELECT m.MachineID,
m.Description,
CASE
...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 8:37 pm
UT- (1/29/2010)
I have a text column that contains notes about a customer, in this column there are mutiple reference numbers of a customer in the format of xxxxxx-xxxxx-xx (e.g 123456-12345-12).
For...
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 8:18 pm
Lowell (1/29/2010)
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 8:13 pm
If it's only 5 DB's, why not simply have a stored proc that takes the parameters and does 5 inserts using the 3 part naming convention?
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 7:53 pm
Ummm... I'm confused. Wouldn't the real key be to keep people from getting a copy of the database to begin with??? :blink:
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 7:49 pm
Heh... Rumor has it that you probably need to rebuild stats because they don't "move" with the data.
--Jeff Moden
Change is inevitable... Change for the better is not.
January 29, 2010 at 7:17 pm
Viewing 15 posts - 40,066 through 40,080 (of 59,098 total)