Viewing 15 posts - 17,926 through 17,940 (of 18,923 total)
I'll let this sink in before I show you the set-based solution.
You might consider it seriously if this report is run very often.. or if the in list is very...
May 2, 2005 at 2:05 pm
Then I guess that the problem comes from the employes list... can we see how you populate that variable?
May 2, 2005 at 1:24 pm
You can't have a parameter in a view so no... By I suspect another problem. What error r u getting from sql server? Or Are you just not...
May 2, 2005 at 1:00 pm
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GO
CREATE PROC A
AS
Select null
GO
May 2, 2005 at 12:47 pm
This will run much faster (the longer the list, the faster) :
Declare @list varchar(200)
set @list = '688,708,87,88'
Select * from Employees
where empID in (Select Element from dbo.Split(@list, ','))
CREATE FUNCTION [dbo].[Split]...
May 2, 2005 at 12:45 pm
if intMemberId"" then
strSql="select tblEvent.EventID as EventID,tblEvent.Event as Event,tblEventCategory.EventCategory as EventCategory,tblEvent.EventDate as EventDate,tblEvent.EventToDate from tblEvent,tblEventCategory where MemberId=" & intMemberId & _
"and tblEvent.EventCategoryCode=tblEventCategory.EventCategoryCode...
May 2, 2005 at 11:06 am
Can we see the cursor code... I'd like to give a shot at the set based approach.
May 2, 2005 at 8:34 am
Tx Frank... Still a long way from catching you.
May 2, 2005 at 5:57 am
If you don't add any indexes then yes. But it's said in the bol that the only garantee to have the order by stay the same is to specify...
April 29, 2005 at 2:10 pm
Ya.. gives something to dream about and keep learning more about sql server... Maybe it's gonna be my turn someday
.
April 29, 2005 at 2:01 pm
In this case this will correct your query and should give you what you need :
CASE WHEN datepart(m, tblInvoiceMaster.invoice_date) = 5 THEN net_amt_due ELSE 0 END as soldmay,
SUM(CASE WHEN...
April 29, 2005 at 1:58 pm
If you need a consultant for that long, you need to permanently hire him... or at least give a 18 months contract. There's no point in doing it in...
April 29, 2005 at 1:30 pm
We didn't think you meant slaves in a bad way... we all know what it is to be "forced" to keep a job. Not the best feeling in the...
April 29, 2005 at 12:01 pm
We could debate this for weeks (with all the knowlegde of this community), but we don't have the table def so I don't see the point of continuing this discussion...
April 29, 2005 at 11:59 am
Viewing 15 posts - 17,926 through 17,940 (of 18,923 total)