Forum Replies Created

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

  • RE: insert then select not working

    The problem is likely to be that the insert is returning a row count that is "confusing" your code.

    Usually a "SET NOCOUNT ON;" in your stored procedure will fix that,...

  • RE: how to find out what columns were the most recent in a table

    IF the server has not been restarted since the changes, you can try the Schema Changes History report available from the reports menu off the database node in SSMS.

    It's not...

  • RE: pageiolatch_SH troubleshooting

    Just thinking about simple things to check here, because I am not as experienced as others on these forums...

    Are you sure that you are not experiencing unexpected file growth in...

  • RE: Returning Month (number) as char(2)

    Thanks for sharing.

    FYI there is another way, which makes use of the US date format having month first:

    select convert(char(2),getdate(),1)

  • RE: Lookup Table

    Welsh Corgi (9/6/2011)


    The way that I have handled Active/Inactive Flag is that the SP that is used to populate the List Box with a WHERE Clause that filters the records.

    Respectfully...

  • RE: Lookup Table

    I was going to talk about foreign key constraints, but it came out wrong...

    I will try again.

    I would urge you to be careful when using an active/inactive flag as well,...

  • RE: Lookup Table

    Welsh Corgi (9/6/2011)


    I always use lookup tables.

    I would not just let anyone add values to the table. THis need to be well thought out or you will have issues.

    I add...

  • RE: Looking for help taking the RBAR from this problem

    J Livingston SQL... I can't believe how long it took me to get the joke in your name!

  • RE: Looking for help taking the RBAR from this problem

    I am glad you are making progress 😀

    I would suggest you keep an eye on this because, from past experience, whenever Jeff goes quiet for a day or two there...

  • RE: Looking for help taking the RBAR from this problem

    Jeff,

    Attached query execution plan for the two queries, your version first, then mine from my machine.

    From your stats, I would say that the optimizer has decided on a different plan...

  • RE: Looking for help taking the RBAR from this problem

    Adding this index to Jeff's table:

    CREATE INDEX IX_Hourly_Stats_By_Device_Cover01

    ON #Hourly_Stats (Device_ID ASC, Server_ID ASC, Data_Timestamp DESC);

    Allows this Device specific query to return data for every server/device...

  • RE: Looking for help taking the RBAR from this problem

    Jeff,

    I tried your test data/sample query on my desktop with different results:

    (Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64) Jun 17 2011 00:54:03 Copyright...

  • RE: Looking for help taking the RBAR from this problem

    Hi clubbavich

    Please find my response below, it is not intended to be confrontational but I am concerned that people will think (reading this thread) that a set based query such...

  • RE: Looking for help taking the RBAR from this problem

    <pokingheadoutofthetrench>

    I disagree that there is an RBAR method here.

    The UNION gets a result out of an 18M+ rows table with only 4 reads - you can't get less RBAR can...

  • RE: Evaluation edition is expired

    I have definitely done a SQL2008 Enterprise Evaluation SKU upgrade (on a test system) - I think it was to SQL2008 Standard edition.

    It was a simple process using the SKUUPGRADE...

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