Forum Replies Created

Viewing 15 posts - 5,116 through 5,130 (of 5,502 total)

  • RE: display all the column values in rows

    pmadhavapeddi22 (7/13/2009)


    Hi Steve,

    I want to display the values as I have given in the example

    But, all columns do not refer to a same data type

    Thanks

    This is just another good example...



    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: duplicate key error on Identity field

    Glad we could help. 🙂

    Edit: (Un)fortunately, we can't help you to get (a) shot. 😀



    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: duplicate key error on Identity field

    Another reason might be an additional UNIQUE constraint other than the primary key.

    As you've stated above, you checked the KEYS section in SSMS. Did you check the CONSTRAINT section as...



    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: display all the column values in rows

    It's rather a task for UNPIVOT...

    Here's a sample (pretty much straight off BOL and slightly modified):

    DECLARE @t TABLE (col1 VARCHAR (10), col2 VARCHAR (10), col3 VARCHAR (10))

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

    Dave Ballantyne (7/13/2009)


    You can lead a horse to water but you cant force him to drink

    http://www.sqlservercentral.com/Forums/Topic751918-8-2.aspx?Update=1

    Obviously the horse is trying to drink from two springs at the same time. Here's...



    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: Customize SQL Query

    Hi,

    I'm a little confused... :ermm:

    your first and your second post both describe a rather large update statement.

    However, your third post is regarding an insert statement...



    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: Missing Data range in a set

    Maybe the misunderstanding is caused by the sample data you provided: they just don't seem to match at all...

    Where can the result data for "a2" be found in base 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: 100 Million Records

    Hi,

    [sarcasm ON]

    please look up "UPDATE" in BOL (Books On Line, which is the help file of SQL Server).

    [sarcasm OFF]

    More serious:

    What do you expect as an answer by providing the amount...



    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: Customize SQL Query

    It's hard to make any tested/verified modification to a query without having any table definition or data to test against.

    If you'd like us to have a more detailed look at...



    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: Customize SQL Query

    Hi,

    please check if the following code will help you to get the expected results.

    IMPORTANT NOTE:

    Since there are no table definitions nor any sample data the code below is completely untested...



    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: Missing Data range in a set

    Hi,

    you might want to have a look at the following article:

    http://www.sqlservercentral.com/articles/Datetime+Manipulation/61822/.

    It describes a fast way to generate a sequence of numbers/dates.

    This could be used in an outer join to find...



    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: Customize SQL Query

    Hi,

    the following part of your code is a little confusing to me:

    ... 'update '+@TABLE+' set AuditData.TATCallType=''12'', AuditData.TATCallUnit=''1'' ' ...

    If I'm reading your code correctly you're referring to @table with 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: Loop thru records in tables in view

    Hi Bob,

    following please find two options on how to define a view depending on how you'd need to get the results.

    Since we don't have any more information regarding table definition...



    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: Loop thru records in tables in view

    Hi Bob,

    why don't you set up a view on your SQL Server containing all information you need (department info and record count)?

    Therewith you wouldn't have to worry about doing two...



    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 Pass Through Query

    duplicate post.

    Discussion already started here.



    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 - 5,116 through 5,130 (of 5,502 total)