Viewing 15 posts - 5,116 through 5,130 (of 5,678 total)
Ninja, the CREATE INDEX #idx_1 ...
also works as CREATE INDEX idx_1...
Don't need the # for the index name there. Just fyi. Works either way.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:58 am
Goldie Lesser (11/2/2010)
Ninja's_RGR'us (11/2/2010)
I do that in prod no problem. Can you post the create table and index scripts you are using?
All 3 of these fail:
CREATE TABLE #Table1
(
...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:56 am
Ninja's_RGR'us (11/2/2010)
Even if it makes no difference here, it should read : IF Object_id('tempdb..#tmp') IS NOT NULLWith tempdb.. missing you'll never have a hit on that id.
Hmmmm....
CREATE TABLE #tmp (tID...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:53 am
Hm, the only solutions I'd have for you with this puzzle would be in T-SQL code, not at the reporting layer.
If you really wanted a date average, you could take...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:46 am
Just to make sure they didn't change something on me in 2k8...
From: http://msdn.microsoft.com/en-us/library/ms188783.aspx
index_name
Is the name of the index. Index names must be unique within a table or view but...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:42 am
Brandie Tarvin (11/2/2010)
GilaMonster (11/2/2010)
WayneS (11/2/2010)
Date field stored as varchar(8000) - what kinds of problems do you see coming up from this OP?
8000 characters for a date? I could store an...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:38 am
Yeah, even this doesn't work:
CREATE TABLE #tmp (tID INT);
IF Object_id('#tmp') IS NOT NULL
BEGIN
DROP TABLE #tmp
END;
IF Object_id('#tmp') IS NULL
BEGIN
CREATE TABLE #tmp(tID INT, tTxt VARCHAR(50))
END;
So, I'm going to go with I had...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 11:35 am
Naidu,
Note that it's all on the #tmp table, which is a temporary build in the tempdb, not a permanent structure. You should have the rights to run both that...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 2, 2010 at 10:53 am
Welp, we barked up the wrong tree... those plans are nearly a match.
*takes the problem to his pillows and sleeps on it*
EDIT: I take that back. Dug a little...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 10:50 pm
WayneS (11/1/2010)
What determines the order that the rows need to be compared in?Is there an identity column on this table?
See above, islanded on the ostid..something and then sorted by the...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 6:32 pm
NOTE: You need the #tmp here, it's not the source data build. It works off the sample data you gave us earlier. What this does is basically create...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 6:27 pm
There's a couple of different techniques and approaches to this and I don't want to give you an over-complicated one if unnecessary. You've posted in the 7.0/2k forums. ...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 6:08 pm
naidu4u (11/1/2010)
and for the remaining rows in the same refotsid, XYZ should be datediff(minute, DateChanged of...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 6:00 pm
I still need to have a better understanding of this before I can even ask what to do with the non-datetimes:
refotsid = 48242 then for the first row I need...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 5:46 pm
Can someone swing through here and see if they can understand what he's looking for better than I can? Or can maybe phrase what we need in a way...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
November 1, 2010 at 5:39 pm
Viewing 15 posts - 5,116 through 5,130 (of 5,678 total)