Forum Replies Created

Viewing 15 posts - 1,231 through 1,245 (of 1,315 total)

  • RE: How do I sum results columns (grand total) without repeating all the formulas

    This is not a flame, but I have some quibbles with Joe's encyclopedic response

     f) Nested query expressions follow the usual scoping rules you would expect from a block...

  • RE: Hungarian Notation To Be or Not To Be

    I definately you should have some naming standards, just not Hungarian.

    For example, we had a manager who heard about the concept of metadata and completely misunderstood it, but soon all...

  • RE: Hungarian Notation To Be or Not To Be

    Ditto to keeping Hungarian out of databases.  I'm a firm believer in using it in code, but the only trace of it I use in databases is a 'vw' prefix...

  • RE: preventing duplication in inner join

    Vladan and Bob have a great solution, unless:

    The listing ID's are not unique

    You want to use more complicated criteria to choose the best match

    You have very large tables

    The solution I...

  • RE: How do I sum results columns (grand total) without repeating all the formulas

    You may be thinking of correlated subqueries that cause extra I/O.  This form of subquery is merely syntax, it lets you create computed fields and then refer to those fields...

  • RE: Monitoring Replication

    You should certainly learn how to set up alerts for replication and other events, that is free and very effective.

    I have to monitor four remote SQL Servers while getting other...

  • RE: Union Views

    select 1 as ord, player as player, sum(pts), str(sum(rebs),6,0) from sum_players where tm = #tm#

    union

    select 2 as ord, 'Total' as player, sum(pts), str(sum(rebs),6,0) from sum_team where tm = #tm#

    union

    select 3 as...

  • RE: preventing duplication in inner join

    I have a similar task, where I'm matching two lists and want the best matches but can have only one unique match for an item from either list.  You don't...

  • RE: How do I sum results columns (grand total) without repeating all the formulas

    AGS gave you the right answer, I don't care how big your query is.

    All the field names you use in the field list and other clauses (WHERE, ORDER BY, etc)...

  • RE: Clustered Index

    Using a large field for a clustered index does not have a significant impact unless the table has other indexes.

    Creating a clustered index on a large field saves space initially,...

  • RE: Join Issues

    It's probably safe to assume that all the Amount and Comment columns are distinct, so SELECT DISTINCT would not affect the row count.

    The only way to "get around" it is...

  • RE: Join Issues

    When you have multiple joins, the resulting record count will be the product of all the duplicates in all tables.

    For instance if you have a central table with joins to...

  • RE: Join Issues

    I'm still prejudiced against the construction "WHERE field = value OR field IS NULL".  My feeling is you want to filter the rows before the join, not after (although the...

  • RE: Fixed width problem

    You might want to put the reformatting in a view, a transformation in the DTS package, or a computed column in the table, rather than updating the table.  This way it applies to data...

  • RE: Combining all rows from a single column without COALESCE

    If any of the names might be NULL, you need to do it this way:

    declare @names varchar(500)

    select @names = ''

    select @names = @names + ISNULL(',' + fname, '') from Users

    select...

Viewing 15 posts - 1,231 through 1,245 (of 1,315 total)