Viewing 15 posts - 11,056 through 11,070 (of 14,953 total)
SSIS is treating it as an error. Often, text returned that way from the query will be handled as an error.
Is there a reason to create a unique index...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 11:23 am
From your example, I don't see how dollar type 1 can equal 0. It looks like dollar type (a column) can be 1, 2, or 3. Please clarify.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 11:21 am
I may be missing something. First you say it's a bit field, then you say it's a binary (image) field, then you're using string functions on it. Also,...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 11:19 am
I'm not sure the question can be answered with the data given, because the business-case of what your adjustment does isn't given.
Will the columns given contain all the necessary data...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 11:11 am
You might be better of using raiserror instead of print.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 11:07 am
I guess the correct answer to all of these is, "hire someone who knows these things, either a contractor or permanent employee".
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 9:41 am
I don't think there's going to be a valid answer to that question as posed, simply due to the number of variables in it.
For example, percentage of IT budget is...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 9:40 am
Ramesh, it's easy enough to test performance on a simplified version of this.
create table #Stats (
ID int identity primary key,
ItemID int,
Date smalldatetime,
Stat1 float,
Stat2 float,
Stat3 float);
create table #KPIs (
ID int identity...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 9:11 am
On the original topic, here's something that kind of kills the "SQL Server doesn't scale out" argument about which is better:
http://www.sqlservercentral.com/Forums/Topic652576-61-1.aspx
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 8:29 am
Just a matter of knowing how implicit conversion works. Watch out for integer division. In SQL Server, when you divide an integer by a number larger than it,...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 8:24 am
Run a server trace for a reasonable amount of time. That'll tell you exactly what's being run and how often.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 7:58 am
select (POWER(8,2))/(POWER(94,2))
Returns 0, which means you are multiplying by 0, which will get 0.
Try:
select (POWER(8.0,2))/(POWER(94.0,2))
And you get 0.007243.
Try adding ".0" to those parts of your Case statement, see if that...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 7:57 am
Does the proc select the data, or is it an output parameter, or a "return value"? Depending on which of these it is, there are ways to get what...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 7:41 am
Assuming (from the forum you posted in) that you're using SQL 2005, this should get you what you want:
;with
[Stats] (ItemID, Stat1, Stat2, Stat3) as
(select ItemID, sum(Stat1), sum(Stat2), sum(Stat3)
from dbo.Statistics
where ItemID...
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 7:39 am
Is the Date column in the Stats table relevant to the sum you want to do? And does it contain time values, or just dates?
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 9, 2009 at 7:18 am
Viewing 15 posts - 11,056 through 11,070 (of 14,953 total)