Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 1,315 total)

  • RE: Join Issues

    If you put variations in the same batch and get the execution plan, it should show you the relative performance as reflected in the % of total time for each...

  • RE: Join Issues

    Oops, forgot a set of parenthesis

    SELECT  ...

    FROM  Organizations o

    LEFT JOIN Totals t ON o.OrganizationID = t.OrganizationID  AND ((t.[Month] >= 7) AND (t.[Year] = 2004) OR (t.[Month] <= 6) AND (t.[Year] =...

  • RE: Join Issues

    I should add that anytime you have more than one way to write a query, you should put the variations together in a batch and use Query Analyzer to show...

  • RE: Join Issues

    You have discovered that filtering records in the WHERE clause can turn an outer join back into an inner join.  The answer is not to make the WHERE clause more...

  • RE: Finding EM diagram name by the name of the table which is included in it

    The table names are in the dtproperties table, but they're hard to get at.

    This is a crude attempt.  I tried to filter out the table names, but sometimes they have an extra...

  • RE: DATABASE CONSISTENCY

    I've never tried this, but BOL says you can do a partial backup and restore of specified filegroups, always including the PRIMARY filegroup.  When you do a partial restore however,...

  • RE: Design Advice Wanted - Date/Time

    Use a single NOT NULL date field for both, and add a check constraint to make sure the time is also present.

    ALTER TABLE tbl ADD CONSTRAINT chktime CHECK (DATEPART(hour, datefield) >...

  • RE: Removing unused indexes according to execution plans

    I've never tried to get the execution plan outside of Query Analyzer, but I think you should look up SET SHOWPLAN_TEXT in BOL.

    Have you tried the Query Analyzer Index Analyzer...

  • RE: Stored Procedure vs Triggers

    The trigger method seems to me to be the most reliable method for capturing audit data.  I have used "INSTEAD OF" triggers to maintain "last modified by" fields to prevent users from...

  • RE: SQL User Connections

    There are monitoring tools that might help you.  I would think if you've got an 8-cpu class server you might find a coupla grand in the budget to help run...

  • RE: Selecting and viewing (NOT deleting) duplicate rows in a table

    select * from table1

    where inv_tag in (

       select inv_tag from table1

       group by inv_tag

       having count(distinct rm_id) > 1)

  • RE: formating the number

    case when x < 0 then ceiling( x * 100 ) / 100

          else floor( x * 100 ) / 100 end

  • RE: Distributed architecture question

    Client Network Utility is a separate program under Microsoft SQL Server on the Start menu.

    I am not aware of any programmable interface for it.

  • RE: Need an Insert SQL Script

    You need to use a three-part name to refer to a table in another database: <database>.<schema>.<table>.  If the table is owned by dbo the middle part can be empty.

    update c...

  • RE: Distributed architecture question

    Use Client Netwok Utility to create aliases for the two servers, and create linked servers to the aliases.

    Then you can have queries written with four-part names that are independent of...

Viewing 15 posts - 1,246 through 1,260 (of 1,315 total)