Forum Replies Created

Viewing 15 posts - 49,126 through 49,140 (of 49,552 total)

  • RE: find the first and last date of the week

    Apparently they don't.

    Sorry, I wrote those a while back and they did work then. Haven't used them in ages. Will check.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: find the first and last date of the week

    Edit: Nevermind.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    My pleasure

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: MCTS - Anyone Preparing?

    I am. Hope to write it in May. I'm working through books online and the MS E-learning. MS also has a (free?) skills assessment that I plan to do soon.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    Not 2 sps, 2 queries in one sp.

    CREATE PROCEDURE ...

    AS

    SELECT ... FROM Sales

    SELECT ... FROM Sales JOIN SalesDetails ... GROUP BY ...

    GO

    It will work, crystal can handle 2 recordsets coming back...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    To be quite honest, that's a presentation issue, not a data issue. It should be taken care of where you're presenting the data (excel, or reporting tool) not in the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    I'm going to need some sample data to help out with this, and an example of what you want.

    By the looks of things, a saleID can have more than one...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: speed up LEN(RTRIM(LTRIM(ERR))) > 0????

    Am I correct in saying that you're looking for records where err is not full full of spaces?

    Put an index on the err column and try this

    SELECT <fields> FROM <table> WHERE Err...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    Sorry, I missed the field 'site'. Also must come out of the group by and be agregated (or removed) in the select.

    No, it's not because they have the same saleID. the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Group By Problem

    Easy enough, move the completion date out of the group by. You'll have to then put a max or min on it in the select clause. Do you want the...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Using sql_variant as a parameter

    A table design that doesn't require constant changing would be a good place to start. This is also violating relational concepts a fair bit, but I can't think of a...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Find top 5 indexes used using Profiler

    In SQL 2005 there's a DM  view that can show you this. sys.dm_db_index_usage_stats

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Stored Function Tables

    That's her automatic signature. Just as mine is "Have a nice day..." It's not aimed at any one but is on every post of hers automatically. It's a pun on...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Stored Function Tables

    Do you mean table-valued function perhaps?

    If so, there's a very nice section in books online (the SQL help files) on them. Title is "User-Defined Functions That Return a table Data...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • RE: Is SQL Server viable in a scalar environment?

    Locks are escalated according to memory availability. It's definatly not a hard threshold of 10.

    Rules for preventing deadlocks.

    1) Keep your transactions as small as possible

    2) Access tables as seldom as...

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 49,126 through 49,140 (of 49,552 total)