Forum Replies Created

Viewing 15 posts - 3,571 through 3,585 (of 6,036 total)

  • RE: Joining 2 Queries

    So, how many columns in final result set?

  • RE: Joining 2 Queries

    How many columns in you result set?

  • RE: Performance Tuning Guide

    - it opens the recordset (table in this case) once; Cursor only opens one recordset one time in the declaration. Rule met for cursor?

    Yes, unless you use FETCH.

  • RE: Help with multivalue crosstable conversion

    Create a function dbo.MembersList (GroupID) to build the Members list for any particular GroupId

    and run this:

    SELECT GroupID, dbo.MembersList (GroupID)

    FROM (

    select GroupID from YourViewName

    GROUP BY GroupID

    ) DT

    This does not use...

  • RE: Issue during update

    Net, you probably did not get the point in my initial post.

    Trigger must just record PKs of the rows affected by changes.

    It must affect just single "trace" table.

    Your updates must...

  • RE: Untrappable Errrors

    Lynn,

    Let's do some exercise.

    Start Profiler, open Trace Properties, add all "SP" events to selected events list and start the trace.

    Now execute procedure.

    Find "SP: Recompile" event right after |SP:StmtStarting|SELECT * FROM...

  • RE: Untrappable Errrors

    Because procedure contains temp table it's recompiled every time it's executed.

    On recompilation optimiser checks for existence of all objects mentioned in SP.

    Because #fred does not exist and is not created...

  • RE: Performance Tuning Guide

    Not really.

    Does not fit 1st requirement.

    When using cursor you open recordset as many times as many rows it contains.

    And in most cases cursors are created to have a chance to...

  • RE: how to create table inside stored proc

    if exists (select * from sysobjects where id = object_id(N'[dbo].[MyTable]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

    PRINT 'MyTable already exists'

    else

    CREATE TABLE dbo.[MyTable] (

    [username] varchar (64) NOT NULL ,

    [moduleID] varchar (100)...

  • RE: Issue during update

    That's why I always insist on making DEV server the weakest one.

  • RE: Issue during update

    net,

    I've got a trigger on one of my tables which processes inserted data in join with data from 4 other tables and 17 views. Then it populates "result" table with...

  • RE: I need to dynamically generate a list of days in a given date range

    > and there is no preexisting "dates" table to use.

    Then create it.

  • RE: Should I drop and recreate a stored proc everytime?

    Execution plan may be changed even if nobody was touching SP for years.

    It depends in statistics, on indexes, etc., not only on SP code.

    If after next data upload statistics will...

  • RE: Stored Procedure execution error.

    Watch syntax:

    exec (@SQL1)

  • RE: dynamic WHERE clause, Performance issue

    WHERE

    (YourDate >= @FromDate OR @FromDate IS NULL)

    AND

    (YourDate < @ToDate OR @ToDate IS NULL)

    AND

    (FirstName = @FirstName OR @FirstName IS NULL)

    .....

    etc.

Viewing 15 posts - 3,571 through 3,585 (of 6,036 total)