Forum Replies Created

Viewing 15 posts - 6,496 through 6,510 (of 15,381 total)

  • RE: Function vs Direct query

    tony28 (10/16/2013)


    tony28 (10/16/2013)


    I founded that if I start the select twice, the second select is almost always the good time, but sometimes is same or worst,

    It is possible that can...

  • RE: Pass a table variable column value to a SP output variable

    John Mitchell-245523 (10/16/2013)


    Ah yes - in my great haste I assumed that your query resulted in the comma-separated list. I can't tell whether the issue here is generating the...

  • RE: Function vs Direct query

    tony28 (10/16/2013)


    Sean Lange (10/16/2013)


    What you have there is called a multi statement table valued function (MTVF). The performance of these can be a killer. Check out this post from Wayne...

  • RE: Pass a table variable column value to a SP output variable

    Junglee_George (10/16/2013)


    I want to pass the comma separated values to the SSRS report to display there.

    That's why I have used @Hcodes for output parameter.

    I want to pass the comma...

  • RE: Pass a table variable column value to a SP output variable

    John Mitchell-245523 (10/16/2013)


    SELECT @HCodes = DISTINCT...

    That should do it, shouldn't it?

    John

    That will only return the value of one row, not all rows comma separated.

  • RE: View with EXISTS

    Not entirely sure what you are trying to do here but you don't need an IF statement to do this type of thing.

    See if this will get what you are...

  • RE: Function vs Direct query

    What you have there is called a multi statement table valued function (MTVF). The performance of these can be a killer. Check out this post from Wayne Sheffield on the...

  • RE: Indexing and Querying a Frequently Updated Table

    bcampbell-1136357 (10/15/2013)


    Because of this, whenever I run select queries I'm using the WITH (NOLOCK) hint - it's not the end of the world if I get dirty reads, but it...

  • RE: Query response taking lot of time

    Here is the query after some formatting.

    IF @PeriodSelected IS NULL

    AND @ExpenseType = 'Non Chargeable'

    BEGIN

    SELECT EC.EXPENSE_DESC

    ,SUP.SUPPLIER_DESC

    ,SUM((NL.BASEVAL) * CASE

    WHEN CURR.RATE IS NULL

    THEN 1

    ELSE CURR.RATE

    END) TOTALCLAIM

    FROM VW_FACT_NLTRANS NL

    INNER JOIN VW_DIM_EXPENSECODE EC ON...

  • RE: Is TRY-CATCH in SQL still a best practice?

    dwain.c (10/15/2013)


    Sean Lange (10/15/2013)


    If you got your quote correct that person is moron.

    Well now Sean, there was no reason to hold back because we're all friends here. Why...

  • RE: Is TRY-CATCH in SQL still a best practice?

    Jeff Moden (10/15/2013)


    Sean Lange (10/15/2013)


    If you got your quote correct that person is moron.

    Heh... if the quote is correct, then that "DBA" is more off than on, so stop insulting...

  • RE: Using a column name in a COUNT function

    LoztInSpace (10/15/2013)


    COUNT(*) is absolutely the right way and COUNT(1) doesn't mean or do anything different other than cause confusion. If it was somehow better and yet returned the same...

  • RE: Using a column name in a COUNT function

    SQLMaister (10/15/2013)


    There is no benefit in using select count(1), Select Count(columnname) excludes NULL values, that is the intended purpose. Select count(*) is the most efficient and correct way.

    Pretty broad brush...

  • RE: Using a column name in a COUNT function

    Antares686 (10/15/2013)


    Charles Kincaid (10/15/2013)


    What I would actually like to see is COUNT() to mean to count the number of rows.

    I would like to only have to type COUNT() instead of...

  • RE: Help on update ??

    jbalbo (10/15/2013)


    Sorry

    I have a provider table each with a unique OID

    I want to do the following INSERT on each provider

    Some will have them already but it willl just send...

Viewing 15 posts - 6,496 through 6,510 (of 15,381 total)