Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 5,502 total)

  • RE: 11 columns uniquely identify a record......primary key?

    Another option:

    Extract those 12 columns into a separate table with an identity column and replace the 12 columns in your original table with the id of the new table.



    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: Is there a way to do this without a cursor/loop to process individual records?

    Understood. Just wanted to make sure.

    Regarding your performance concern:

    As long as you're not running this code with hundred thousand of rows from your source table during peak hours, you should...



    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: insert error with computed column index

    May I recommend a minor change?

    Change the data type of @vCommand in your sproc to NVARCHAR(MAX)?

    The data type text is marked as deprecated starting with SS2K5.



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

    GSquared (1/5/2011)


    ...

    Are you trying to imply that a lump of plastic, metal, and toxic semiconductors can't understand that it's supposed to do what I want, not what I told it...



    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: trigger update and compare string !?

    Here's a setup to play with including some tests to check whether a sproc will be fired or not.

    USE tempdb

    GO

    if object_id('temp','U') is not null drop table temp

    CREATE TABLE temp( idCourse...



    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 Query Modifications

    joshtheflame (1/5/2011)


    is there any other way ?

    SQL side: Yes.

    Please check if you can Edit:call a SQL stored proc from .NET that will return a dataset (don't know, I'm still 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: Pivot Query Modifications

    joshtheflame (1/5/2011)


    Well can we achieve the same result with different approach as i am stuck with this dynamic thing and .NET DATA set requirement is column in Select statement ..somehow...



    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 Query Modifications

    joshtheflame (1/5/2011)


    Lutz,

    Can we do the same with different technique? I mean one simple select with all the 32 desired columns?

    What do you mean by "the same" and "desired columns"?

    Are you...



    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: Need to Distinct t Particular column result

    First of all, I apologize for assuming the task being homework... 😉

    Using tommy's Tally table approach, here is a set based solution:

    ;WITH

    a1 AS (SELECT 1 AS N UNION...



    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: sql for branch Wise report

    joshtheflame (1/5/2011)


    Lutz,

    I got stuck in a really nasty situation with the dynamic query in my previous thread. If I run the procedure it sure populates the column and display them...



    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 Query Modifications

    copied from another thread:

    I got stuck in a really nasty situation with the dynamic query in my previous thread. If I run the procedure it sure populates the column and...



    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: trigger update and compare string !?

    Your approach will only compare the first updated value, whereas "first" is equal "first random" in this case since there is no ORDER BY.

    When you use triggers always make sure...



    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: Is there a way to do this without a cursor/loop to process individual records?

    Did you talk to the vendor regarding your attemt? They might not provide support as soon as you start bypassing their software...



    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: Need to Distinct t Particular column result

    First we'd need to know what you define as being "distinct"...

    The sample data and your expected output is not clear enough on that.

    My guess would be that this is 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: sql for branch Wise report

    Josh,

    based on your other thread you already have a DynamicCrossTab on almost the same data.

    Just change how the temp tables are populated and adjust the column names in your dynamic...



    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 - 2,191 through 2,205 (of 5,502 total)