Forum Replies Created

Viewing 15 posts - 4,486 through 4,500 (of 5,502 total)

  • RE: Table design/select statements - rows to columns (T-SQL)?

    christian.rosberg (1/16/2010)


    ...

    1. Is there an easy way to get the resultset I'd like, based on the table design I currently have?

    2. Would you prefer an alternate table design?

    Question 1:

    Yes...



    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: A Genetic Algorthm Sample in T-SQL

    Bill Talada (1/15/2010)


    To keep the code sample very small, I cut some corners. The code that "looks" at the surroundings of the robot assumes a square border around 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: Any suggestions other than distinct

    Like I said in my previous post:

    You have TEXT data type for Nome(text,null) and Empresa(text,null).

    It seems like there is some confusion what that data type really is supposed to be...



    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: A Genetic Algorthm Sample in T-SQL

    Bill Talada (1/15/2010)


    If t-sql supported arrays, I would have implemented a gnarly shaped maze of walls and partial dividers and the robot would have adapted beautifully.

    How would you define 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: Changing a FLOAT column to VARCHAR

    Nicholas Cain (1/15/2010)


    One thing about trying to cast or convert a Zip code to a decimal or int, you'll run into problems where a zip starts with a 0 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: Changing a FLOAT column to VARCHAR

    Since FLOAT is an approximate-number data type, the character length may vary, therewith exceeding the VARCHAR(10) limit.

    You need to get the value converted to a "known length".

    Either one of...



    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: Using a SQL database string as XML dataset

    I would create a view on SQL Server side that transforms the xml data into a table and query the view.

    You could also use that statement directly inside SSRS to...



    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 transform with multiple value columns

    I used Google with "ssis pivot transformation" which brought this site[/url] back as the first hit.

    Seems to answer your question....



    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: Any suggestions other than distinct

    It would help a lot if you could at least post the complete error message (including error message number). Even better if you could post your table definition.

    I'd guess one...



    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: number the Group on data from two columns duplicated

    Jeff Moden (1/14/2010)


    shaini.binu (1/14/2010)


    [font="Arial Black"]Quote: Am I right that you'd need to start a new group as soon as neither one of the numbers in one row has been previously...



    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 transform with multiple value columns

    Something like this? (Please note how I set up the sample date to be ready to use for others...)

    Even though SQL Server has several ways of getting your requested results,...



    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: number the Group on data from two columns duplicated

    I thought about applying the concept of a hierarchical CTE (aka recursive CTE, see BOL for details). Basically, I would have used the smaller ID per row as "manager" 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: number the Group on data from two columns duplicated

    Would you mind sharing the business case that would use such a strange data structure?

    Regarding your requirement:

    Am I right that you'd need to start a new group as soon 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: Generate even numbers using powers of 2 and tally table

    It works with even Edit: odd numbers as well...

    You'd just have the most right bit set to 1 as well (2^0=1). Basically starting your "Power table" with 0 instead of...



    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: Generate even numbers using powers of 2 and tally table

    I'm still trying to figure out why it works, but it works.

    Let's see what I can do...

    Using your example, 46(base10) can be written as 101110(base2). Agreed?

    Let's start with...



    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 - 4,486 through 4,500 (of 5,502 total)