Re: Creating a dynamic Global Temp Table within a stored procedure
PRACTICE WHAT YOU TEACH CELKO!!!!!
I've seen you use a) TEMPORARAY TABLES and b) CURSORS in these forums.
Its yet another case where your biased 'education instiutions only' detaches
you from what people really need and want out in the real world where we
have real problems and require real solutions....
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@eart hlink.netwrote in message
news:1157656620 .979840.4690@e3 g2000cwe.google groups.com...
>
>
Good RDBMS programming and principles are not my personal opinion; you
can read Dr. Codd, Chris Date, Fabian Pascal, McGovern, etc. for the
foundations. Erland just told the guy the same thing, but without any
details to help him learn. Why not jump him and rant?
>
>
Yes, it is. It is also just convenient to use a copper penny instead
of getting a fuse from the hardware store.
>
>
No, there was no problem statement. As Chris Date puts it in a book
title of his, we need to hear "WHAT" and not "HOW" to have a spec.
Also, I think that after seven books on the language and ten years on
the Standards Committee, I have some understanding of SQL :) What are
your credentials?
>
A problem statement is "my bill of materials is a hierachy and I need
to aggregate the weights of the components into the sub-assemblies"; it
is not "How do I create a temp table {assumed method} to aggregate
the weights of the components into the sub-assemblies"; that is a
method and not a result. Now we can come back with the nested sets
model, or adjacency list model with a recursive CTE as a suggestion for
the hierarchy, and avoid a temp table completely. Ask "WHAT" and not
"HOW" -- basic software engineering. Hell, basic any kind of
engineering!
>
PRACTICE WHAT YOU TEACH CELKO!!!!!
I've seen you use a) TEMPORARAY TABLES and b) CURSORS in these forums.
Its yet another case where your biased 'education instiutions only' detaches
you from what people really need and want out in the real world where we
have real problems and require real solutions....
--
Tony Rogerson
SQL Server MVP
http://sqlblogcasts.com/blogs/tonyrogerson - technical commentary from a SQL
Server Consultant
http://sqlserverfaq.com - free video tutorials
"--CELKO--" <jcelko212@eart hlink.netwrote in message
news:1157656620 .979840.4690@e3 g2000cwe.google groups.com...
>>There are a lot of reasons someone might want to create a table on the
>>fly. They might want to store a snapshot of data at a given time that
>>is easily accessable. <<
>>fly. They might want to store a snapshot of data at a given time that
>>is easily accessable. <<
>>It may not fit your ideal of how SQL "should" be used, but it's actually
>>quite common in the real world - and it need not invoke images of
>>falling pachyderms. <<
>>quite common in the real world - and it need not invoke images of
>>falling pachyderms. <<
Good RDBMS programming and principles are not my personal opinion; you
can read Dr. Codd, Chris Date, Fabian Pascal, McGovern, etc. for the
foundations. Erland just told the guy the same thing, but without any
details to help him learn. Why not jump him and rant?
>
>>Sometimes it's just convenient to make a temp table. <<
Yes, it is. It is also just convenient to use a copper penny instead
of getting a fuse from the hardware store.
>
>>He told you what he wanted - the "problem" is your inability to
>>understand that most people use SQL in ways that go beyond your precious
>>standard. <<
>>understand that most people use SQL in ways that go beyond your precious
>>standard. <<
No, there was no problem statement. As Chris Date puts it in a book
title of his, we need to hear "WHAT" and not "HOW" to have a spec.
Also, I think that after seven books on the language and ten years on
the Standards Committee, I have some understanding of SQL :) What are
your credentials?
>
A problem statement is "my bill of materials is a hierachy and I need
to aggregate the weights of the components into the sub-assemblies"; it
is not "How do I create a temp table {assumed method} to aggregate
the weights of the components into the sub-assemblies"; that is a
method and not a result. Now we can come back with the nested sets
model, or adjacency list model with a recursive CTE as a suggestion for
the hierarchy, and avoid a temp table completely. Ask "WHAT" and not
"HOW" -- basic software engineering. Hell, basic any kind of
engineering!
>
Comment