Forum Replies Created

Viewing 15 posts - 271 through 285 (of 441 total)

  • RE: Long execution times when including simple SQL functions into a join

    Pieter (5/20/2009)


    The TSQL functions are in the select portion not the Where clause or Join conditions.

    CLR is an option and I tried to convert that phone function. However, as unexpected...

  • RE: Long execution times when including simple SQL functions into a join

    Can you post the function, maybe making it Inline might help performance, if it's not already an Inline function. At least, it will get inserted in the execution plan, and...

  • RE: If Exist, Update Value in Table

    Damn jack, you beat me to it, 😉 Good job!

  • RE: Grouping on a field for some records

    Here, I built it for you, I hope that helps, tell me if I understood your problem correctly.

    USE tempdb

    DROP TABLE #Product

    CREATE TABLE #Product (

    ProductID INT ...

  • RE: Grouping on a field for some records

    Sounds fun, can you post the DDL of the table and some sample data, I'm up for it, and I bet a lot of people will post back if you...

  • RE: Counting Records

    Really interesting Chris! I also read Gail's article, and it explain perfectly the how and why of the count, and I was mistaking to think counting a column would help!...

  • RE: Number of Logins in sleeping status....!!!

    SQL_Monster (5/11/2009)


    Thanks for the reply,

    Actually we are facing the issues like : TECH_MESSAGES like,

    1. Object reference not set to an instance of an object.

    2. ...

  • RE: Counting Records

    Christopher Stobbs (5/13/2009)


    Just a side not for anyone that is interested.

    I've created a table on my test system with two columsn

    VARCHAR(900) --Max size for a clustered index

    VARCHAR(32)

    even when I create...

  • RE: Counting Records

    this is the non clustered index i added

    CREATE NONCLUSTERED INDEX [idx_entity_identifier] ON [dbo].[EntityCollection]

    (

    [EntityIdentifier] ASC

    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING...

  • RE: Counting Records

    sql_prodigy (5/13/2009)


    its not partitioned, but i managed to sort this problem out.

    i added a non-clustered index on a smaller column and voila... i now have great performance

    thanks for all the...

  • RE: Duplicate Primary Keys - How to Handle ??

    Can't you find a better primary key to suit your needs? Can you explain your situation with DDL and sample data?

  • RE: Select statements included within a function cannot return data to a client

    You need to assign the returning value from the select to the variable you declared.

    Like that :

    DECLARE @var nvarchar(200)

    select @var = top 1 field1 from table1

    return @Var.

    That will fix your...

  • RE: Counting Records

    If your count needs to be accurate, then you will either need to run the DBCC UpdateUsage ('DatabaseName','TableName') before you query the sys.partitions view, or run the Select * against...

  • RE: Counting Records

    sql_prodigy (5/12/2009)


    anyone? 🙁

    does the DBCC UPDATEUSAGE have to run everytime i do a count from my table using sys.indexes

    Depends if your count needs to be 100% accurate, or if you...

  • RE: How to skip rows during insert

    Hi, do not forget a trigger can be sent many rows at once, so your select with variables will not work.

    Use this kind of approach to solve your problem, only...

Viewing 15 posts - 271 through 285 (of 441 total)