Viewing 15 posts - 1,696 through 1,710 (of 6,486 total)
Michael Valentine Jones (9/24/2009)
Ankur Bajaj (9/24/2009)
...
If having the facility to install Oracle server on windows OS does not limit its utility or performance then what is the reason Microsoft does...
September 24, 2009 at 2:35 pm
Ankur Bajaj (9/24/2009)
I agree with you.The entire SQL Server design is very OS-specific and this seems to have been more intentional and motivated by business purposes rather than optimization.
I am...
September 24, 2009 at 11:09 am
niall.baird (9/23/2009)
Yes - but we are using BIT fields, not Int.
You're asking about the numerical value being stored in binary form in something that is 1-bit wide. Bit columns...
September 23, 2009 at 8:16 pm
niall.baird (9/23/2009)
September 23, 2009 at 7:34 pm
dubem1-878067 (9/23/2009)
I don't think I would have imagine a solution like yours, it's brilliant
But I would like to have your opinion on this query assuming I know the ID_COMMUNITY...
September 23, 2009 at 7:12 pm
Your syntax error is cause by trying to alias part of a calculation.
select
Dispatch_Hour_Sortable
,Dispatch_Month_Sortable
,Dispatch_Month
,Datediff(DD,(dispatch_time-day(dispatch_time)+1),DATEADD(MM,1,(dispatch_time-day(dispatch_time)+1)))as 'days in month'
,Count(v_incident_times.Incident_pk)AS COLUMN_COUNT
,Count(v_incident_times.Incident_pk) / /*'days' = --This is causing the error*/
CASE
WHEN Dispatch_Month_Sortable IN...
September 23, 2009 at 11:04 am
Whether it's worth it is up to you. It looks like you need to use it something like that in several places, so I'd think it might be.
Given what...
September 23, 2009 at 10:39 am
Also - be sure to set the IsDeterministic and IsPrecise attributes. They can have a big impact on how often your function is evaluated.
September 23, 2009 at 9:24 am
Assuming dispatch_month is an actual datetime you're grouping on, you can use something like
datediff(day,dispatch_month,dateadd(month,1,dispatch_month))
to get the days in a given month.
September 23, 2009 at 9:06 am
kramaswamy (9/22/2009)
Matt Miller (#4) (9/22/2009)
This is bound to go *boom* if ANYONE is doing inserts on the table while you're running this loop.
What is the inner stored procedure doing? ...
September 22, 2009 at 6:02 pm
Fausto Echevarria (9/22/2009)
This is bound to go *boom* if ANYONE is doing inserts on the table while you're running this loop.
What is the inner stored procedure doing? This approach tends...
September 22, 2009 at 3:51 pm
Fausto Echevarria (9/22/2009)
DECLARE @MAX_ID int, @CONS int, @CURRID int
SELECT @MAX_ID=0, @CONS=1
SELECT @MAX_ID=COUNT(*)
FROM YOUR_TABLE
WHILE @CONS<=@MAX_ID
BEGIN
SELECT @CURRID=ID
from (
select ROW_NUMBER() OVER (order by ID desc) ROWNUMBER,*
from YOUR_TABLE
) a
where...
September 22, 2009 at 3:12 pm
Per BOL -
If the table contains an identity column, the counter for that column is reset to the seed value defined for the column. If no seed was defined,...
September 22, 2009 at 10:52 am
The bigger question is - what do you plan on doing with the results? If you plan on, say, storing the interest earned in a day, and then...
September 21, 2009 at 3:50 pm
raym85 (9/20/2009)
September 20, 2009 at 8:27 pm
Viewing 15 posts - 1,696 through 1,710 (of 6,486 total)