Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)

  • RE: Can smiply fly

    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,...

  • RE: Outer Join To Get Blank Appointment Times

    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

  • RE: Query runs slow as Stored Procedure

    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.

  • RE: Using IF in a SELECT statement?

    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,...

  • RE: Slow performance of update statement

    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...

  • RE: count problem

    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

  • RE: Using variables within IN

    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...

  • RE: DoEvents with SQL Server 2000 and Extended Procedures

    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...

Viewing 8 posts - 1 through 8 (of 8 total)