Forum Replies Created

Viewing 15 posts - 106 through 120 (of 133 total)

  • RE: Executing dynamic functions in table select

    The discussion I want is about having a column where you have a statement, or an UDF, in a form of a VARCHAR, and with an SProc have that...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Executing dynamic functions in table select

    Compare it with a single function reading the data from a single Calendar table having holiday records specific for different locations, and simple user interface which allows users update...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Partitioned table without a primary key

    Back in the 1980'2, when I was on ANSI X3H2, the question of whether or not to require a primary key in the table came up in the committee. Back...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Partitioned table without a primary key

    BY DEFINITION, a table has to have at least one key. Your narrative is for a deck of punch cards written in SQL. Exactly what is this data?

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: how to copy data from primary table and its dependencies from one id to another and then how could I remove primary table with its dependencies

    >> I have one table called A. A has dependencies on B. B has dependencies on c. C has dependencies on D. A has dependencies on B,C,D. <<

    Please read...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Re-ordering a Sequence

    https://books.google.com/books?id=i-19BAAAQBAJ&pg=PA326&lpg=PA326&dq=celko+update+steps+sequence&source=bl&ots=cQLK5RSXru&sig=ZxDMK3uizuhrEOgrh6guQYJVF6A&hl=en&sa=X&ved=0ahUKEwjqjOi5uMnOAhVP-GMKHTbHAsIQ6AEIJDAB#v=onepage&q=celko%20update%20steps%20sequence&f=false

    And I got the back seat cover washed and returned without killing Ms Mya, the quietest, gentlest dog we have ever owned. 🙂 I just got through reading a...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Re-ordering a Sequence

    I apologize for this half answer, but in some of my books I have an update statement that uses a case expression (not a case statement, please?) To move things...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Rounding in tsql

    skeleton567 (8/16/2016)


    When I started writing code as far back as 1969, the accepted method was to add 5 to one place to the right of the desired result length and...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Rounding in tsql

    I used to be a statistician in a former life, but I do not remember ever seeing a really good book/paper/magazine article on all the problems of rounding! Usually all...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Rounding in tsql

    Me! Me! 😛 But which one? There have been:

    1) go up or down from "x5" alternating.

    2) go up or down from "x5" in a uniform random distribution.

    3) go up...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Rounding in tsql

    The ANSI/ISO standards define rounding as "implementation defined", so you have to be careful. Google scientific versus commercial rounding (I prefer this because it is more "set oriented" than "single...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Add New Column with RowID

    Nusc (7/31/2016)


    IF you don't mind saving that xlsx as a csv file and importing as a flat file source so there are no differences would be great.

    Year , name, latitude,...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: A twist on recursive query

    Adam Mechanic had an improved technique. The only downside was that if the adjacency list had a cycle, it was bitch to find. The old stack algorithms could be written...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: A twist on recursive query

    What you are doing is modeling a hierarchy with an adjacency list model (basically fake pointer chains). Google around for "nested sets model" and use it instead. After all, SQL...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

  • RE: Stairway to T-SQL: Beyond The Basics Level 8: Coding Shortcuts using += and -= Operators

    Yes, lots of them. I am scared of SQL injection (https://xkcd.com/327/), but more than that, procedures make portability much easier. If I have done a good job, and follow the...

    Books in Celko Series for Morgan-Kaufmann Publishing
    Analytics and OLAP in SQL
    Data and Databases: Concepts in Practice
    Data, Measurements and Standards in SQL
    SQL for Smarties
    SQL Programming Style
    SQL Puzzles and Answers
    Thinking in Sets
    Trees and Hierarchies in SQL

Viewing 15 posts - 106 through 120 (of 133 total)