Viewing 8 posts - 1 through 8 (of 8 total)
How about a description of what you are trying to achieve. Also some sample data may help. I'm sure there is a simpler way than the many subselects,...
September 15, 2003 at 8:57 pm
Include the where as part of the join.
select outlookcalendar.CalDate,outlookhours.CalHour,outlookcalendar.Calnote from outlookhours
left outer join outlookcalendar
on OutlookHours.CalHour = outlookcalendar.calHour
and outlookcalendar.CalDate = '08/25/2003'
order by OutlookHours.CalHour
August 26, 2003 at 5:52 pm
I recently observed the same problem. As Stu suggests, assign the parameters to variables and use the variables in the query. This worked for me.
July 2, 2003 at 6:21 pm
quote:
I can use CASE, but then I'll need to do CASE WHEN bill_method = 'CC' 4 times to display CC_Name, CC_Type, CC_Number,...
June 24, 2003 at 8:20 pm
Here's an example update statement:
update dbo.tMappingRule
set ratio = r.ratio
from dbo.tMappingRule mr
inner join tMappingTemplateRule r
on r.AccountID = mr.AccountID
and r.LevelID = mr.levelID
and mr.DataCycleID = @DataCycleID
and r.MappingTemplateID = @MappingTemplateID
What I found was if...
June 16, 2003 at 6:12 pm
Lis,
Something like this should work.
select salesperson,
sum(case when month(visitDate) = 5 and year(visitDate) = 2003 then 1 else 0 end) as noOfVisits
from visits
group by salesperson
June 16, 2003 at 1:47 am
GRN,
You do not need to select * from the function, you can simply use the function as if it's a table which is easier to read. Your example would...
June 16, 2003 at 1:21 am
I don't think the performance overhead is as large as the article suggests.
When @iNBR_DOEVENTS = 0 the IF statement that checks to see if the extended stored procedure should be...
August 26, 2002 at 12:25 am
Viewing 8 posts - 1 through 8 (of 8 total)