Forum Replies Created

Viewing 15 posts - 39,811 through 39,825 (of 49,552 total)

  • RE: T-SQL 2005 Help

    Alvin Ramard (4/11/2009)


    If you have to use that kind of logic then you might want to use stored procedures and use something like:

    If A = B

    BEGIN

    EXEC Stored_Procedure_1

    END

    ELSE

    BEGIN

    EXEC Stored_Procedure_2

    END

    That's often 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: T-SQL 2005 Help

    Shane Redding (4/11/2009)


    In regards to the below, perhaps you should go work for the microsoft sql server team as GOTO is not uncommon in TSQL. 🙂

    Just because the MS...

    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: Are the posted questions getting worse?

    Bob Hovious (4/11/2009)


    Okay... how many people here advocate the use of GOTO statements in T-SQL?

    I do, solely for error handling in SQL 2000. Since there isn't a TRY-CATCH construct in...

    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: Index tuning

    Grant Fritchey (4/11/2009)


    Instead, if you were trying to use a covering index to solve the bookmark lookup, all the columns needed to satisfy the query would have to be...

    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: why does it display clustered index scan in the Executed plan ?

    The clustered index is the table. The leaf level of the clustered index contains the actual data pages of the table (see books online for details on index architecture) so,...

    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: Are the posted questions getting worse?

    Jeff Moden (4/10/2009)


    If that site has truly cribbed the exams, then the MS Certs have become truly useless for evaluating a potential employee's skills based on the cert listing...

    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: log_reuse_wait_desc = replication but there's no replication

    Either they were restored from backups of published databases or there was replication at one point and it was removed improperly.

    Set the server up for replication, create a publication in...

    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: Get sum at the bottom of one column by using Store procedure

    That's not what you want to order the final result set by. You want to order it by something that makes the total come after the detail lines.

    Think about it....

    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: DMV's in SQL 2005

    Have you looked in Books Online? There's a pretty good list in there. Use the index rather than contents and look for anything that starts with sys.dm

    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: Get sum at the bottom of one column by using Store procedure

    josephptran2002 (4/10/2009)


    I think I solved my problem, I use reporting service.

    In that case I would strongly advise you to do the totalling in the report. Reporting services has very...

    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: Get sum at the bottom of one column by using Store procedure

    Reporting services? Crystal Reports? Some other reporting tool?

    Most reporting tools have the ability to produce totals within the report, based on the data coming back from the DB. It's generally...

    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: Get sum at the bottom of one column by using Store procedure

    Vijaya Kadiyala (4/10/2009)


    Is this in any report? or any Front-End application.

    Good point. This is definitely something that's best done in the front end/report rather than in the database.

    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: Show MVP Status on forum posts

    RBarryYoung (4/10/2009)


    What I want is my own level title and logo like Brian has with that "Keeper of the Duck" thing! How did he get that anyway? It's...

    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: SQL Server doesn't START

    Please post the details of those errors. Just listing the numbers is not sufficient.

    Actually, if you can find the SQL error log and post the entire of it (removing server...

    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: Get sum at the bottom of one column by using Store procedure

    Lookup the ROLLUP keyword in Books Online. (you'll probably find examples under the section "GROUP BY (Transact-SQL)")

    One other point, looking at your procedure. There's no point in an ORDER BY...

    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 - 39,811 through 39,825 (of 49,552 total)