Viewing 12 posts - 16 through 27 (of 27 total)
For those not having Yukon, etc I wrote this query.
The query tells you if the person has the 8 accounting periods required and that the distances between the periods...
January 27, 2005 at 4:08 pm
Here is another solution involving just joins
select h.headerid,h.[sum]
from header h
inner join
(select distinct b.headerid as bHID, b.item as bItem
from detail b
inner join
(select a.hid, count(*) as ItemsSold
from (select...
January 25, 2005 at 11:25 pm
Very good question.
I would venture to say, that the answer to this question is not a piece of sql code. However, maybe somebody will know rightout of SQL text...
January 25, 2005 at 7:56 pm
Here is another way probably a little faster, using a function
select Name, dbo.PosTitle(fkfirstChoice), dbo.PosTitle(fkSecondChoice)
from JobApplicants
create function dbo.PosTitle(@Choice int)
returns varchar(50)
AS
Begin
declare @Title varchar(50)
Select @Title = PositionTitle from OpenPosition where pkPositionID=@Choice...
January 24, 2005 at 10:55 pm
It seems that the question was to obtain the product key in the first gap. hence, we need a function that returns such value. I took Phil's answer and re-wrote it...
January 22, 2005 at 10:14 pm
Two comments on Kenneth reply:
Kenneth said that he is not surprised to see that the beast is taking its toll on server resources. My question however, is why query :...
January 22, 2005 at 8:58 pm
I think that under some conditions the number of rows to be updated should weigh into the decision to use memory tables.
I agree that if the table size is...
January 20, 2005 at 12:14 am
A quick update on this issue.
Good news!!!. I let the query run for as long as it needed. It did complete after 16 minutes. The final stats are shown...
January 19, 2005 at 11:27 pm
AngelaBut hasked if I had updated the table statistics.
Yes, I did run the update stats for all the base tables but the query still hangs.
I let it run...
January 19, 2005 at 8:32 pm
It seems that there is an easy solution.
The idea is to use induction as follows: if I know when two dates are contiguos then I should apply that query...
January 19, 2005 at 1:00 am
Antares686 suggested that I post the showplan. Attached in the showplan for the query with the search condition on. (the one that hangs)
StmtText StmtId NodeId Parent PhysicalOp LogicalOp Argument DefinedValues...
January 18, 2005 at 3:22 pm
I have been playing with RS recently and I can tell you that to get the designer you have to install RS client portion into an existing VS.NET IDE. The...
May 13, 2004 at 11:16 pm
Viewing 12 posts - 16 through 27 (of 27 total)