Forum Replies Created

Viewing 15 posts - 3,151 through 3,165 (of 5,502 total)

  • RE: Getting Data back from a Stored Proc

    mike 57299 (7/14/2010)


    I have legacy code that does not allow for identity columns, thus I have a table that holds the last "PK" value. I am getting occasional update...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Converting char to decimal?

    David Levine-327541 (7/14/2010)


    Hi all..

    I have a table that has a char(20) field. I need to hit this table (and field) from an external BI application.

    Usually, we will create a...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Getting Data back from a Stored Proc

    What exactly are you trying to do?

    I don't see the input parameter @table_name being used anywhere.

    The condition WHERE gpk_pk = 'HOLDER' will fail since gpk_pk is an INT data type.

    The...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Strange performance issues

    What is the value of STATISTICS_NORECOMPUTE for the index in question?

    It seems like the index distribution statistics are not recomputed...

    How did you add the indexes (using T-SQL, SSMS->NEW INDEX or...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Optimizing query

    I'd use a different concept:

    Instead of using the function dbo.fn_ConvertToBusinessDate(pl.date) I probably would use a calendar table and join the productLine table to it.

    I would consider normalization of aztec.dbo.ProductTaxRules (preferably...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Help with dynamic cross-tab

    Jeff Moden (7/13/2010)


    ...

    Dang, Lutz... looks like I'm going to have to turn the "doesn't use RBAR, KISS it instead" crown over to you, Lutz. Very well done.

    What's next... ...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Query that joins a 1-many table returning multiple results

    Please provide some sample data to populate the tables you provided the DDL for.

    That would allow us to see the results you're getting with your current query.

    What we also would...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Divided by zero

    How about the following solution?

    SELECT 5/(ISNULL(NULLIF(EXPECTEDDURATION,0),1))

    The NULLIF() function will return NULL if EXPECTEDDURATION is Zero. Fortunately, a devision by Zero is allowed and will return NULL. But since you don't...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to execute Stored Procedure when there's any changes on the existing data

    cold_blue (7/12/2010)


    Hi Lutz,

    View table seems like not practical in my case.

    In my stored proc, it used to calculate the value

    1. by its own table's columns

    2. update the cost column. Scenario:...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Group by column text in one row

    vikrantkale18 (7/12/2010)


    Thanks LutzM

    It works , as per expectation

    Well, that's what usually happens if someone post ready to use sample data and expected results - exactly like...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Query help..

    priya__ (7/12/2010)


    Thank you so much!!!!!!

    This is exactly what I wanted..the results are PERFECT!!!!!!!!

    I really don't know how this is working but your code is fetching( in seconds :-)) what I...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Group by column text in one row

    This approach might perform better:

    SELECT

    textID,

    STUFF((SELECT '-' + Typetext FROM test t2 WHERE t2.textID = t1.textID FOR XML PATH('')),1,1,'') AS [TypeText]

    FROM test t1

    GROUP BY textID

    If...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Pivot Table

    I second Wayne: there is nothing provided to support the missing row needs to be between 6 and 7. It could be between 5 and 6, too (assuming the time...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: How to get SQL2008 db to another machine running SQL2005?

    Is the person who wrote the database stuff still around?

    If so, can/will this person answer this "simple" question: Is there anything SQL SERVER 2008 specific within either your database or...



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • RE: Column Mapping Using Bulk Insert command In tsql.

    See BOL (BooksOnLine, the SQL Server help system), section

    "bcp utility [SQL Server], format files" or section "BULK INSERT (Transact-SQL) "



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

Viewing 15 posts - 3,151 through 3,165 (of 5,502 total)