Viewing 15 posts - 46 through 60 (of 127 total)
The view-based query might be performing "as expected" for what it is. The view has some huge obstacles to overcome: the views are using cross joins -- joins do...
June 11, 2008 at 6:23 am
Please give a look at the "ranking" functions such as "row_number()" and "rank()" in books online. Pay particular attention to use of the OVER() clause in conjunction with both...
June 11, 2008 at 6:09 am
My general preference for the situation you describe is to use the trigger. I prefer this mainly because this bonds the auditing to the table rather than rely on...
May 27, 2008 at 6:33 am
I gave an SQL 2005 answer because we are in the 2005 forum; hang on and I'll review; sorry.
May 23, 2008 at 7:58 am
It looks to me like you can use a straight-up UPDATE statement without bothering with the cursor -- what is preventing this?
May 23, 2008 at 7:45 am
One alternative using CROSS APPLY might look something like:
select distinct
GroupID,
b.valueId,
b.valueDate,
b.amount
from theTable a
cross apply
( select top 1
ValueId,
...
May 23, 2008 at 7:36 am
There are a number of ways to do this. The first way -- probably the best way in this case -- is to do all of the work in...
May 23, 2008 at 7:25 am
I don't think you need to worry about helping Jeff be well rounded; look at the Avatar -- a "circle" is a primary feature! 🙂
May 7, 2008 at 4:55 am
The results of this query are the expected results:
select
count(*) as theCount,
avg(n) as theAverage
from
( select 1.0 as n union all
select 3.0 union all
select...
May 6, 2008 at 2:39 pm
Usually this means that your statement contains aggregate functions -- such as SUM, MAX or MIN -- that are operating on NULL values. As you have seen most likely...
May 6, 2008 at 2:32 pm
I was working with Sybase before they implemented cursors. Cursors came out and they were the new buzzword. Managers wanted cursors, cursors and more cursors -- and THEY...
May 6, 2008 at 6:23 am
Hmm 99.99%. Maybe as far as cursors go you "can't loathe them enough."
May 5, 2008 at 2:03 pm
Augusto,
If by "break" character you mean an ascii control-o you ought to be able to use the REPLACE function with something such as:
declare @cr_char char(1) set...
May 5, 2008 at 11:05 am
I guess I need to also confess that I will at times over-react to cursor based code so take it a little with a grain of salt. Also, please...
May 5, 2008 at 9:36 am
Viewing 15 posts - 46 through 60 (of 127 total)