SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


VIEWS 5


VIEWS 5

Author
Message
OzYbOi d(-_-)b
OzYbOi d(-_-)b
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1716 Visits: 778
tks for the question.

Wonder how many would have jumped at "6 columns" for STEP 2 if it were an option...
bitbucket-25253
bitbucket-25253
SSCoach
SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)SSCoach (16K reputation)

Group: General Forum Members
Points: 16199 Visits: 25280
OzYbOi d(-_-)b (4/3/2012)
tks for the question.

Wonder how many would have jumped at "6 columns" for STEP 2 if it were an option...


Wondered the same, but alas and alack after my series of QOD's concerning VIEWS I decided to leave this one rather simple to answer, correctly.

If everything seems to be going well, you have obviously overlooked something.

Ron

Please help us, help you -before posting a question please read

Before posting a performance problem please read
tmhohl
tmhohl
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 29
I <newbie> also hesitated before submitting, but got it. I'd heard some discussion regarding this from some of my peers...
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)

Group: General Forum Members
Points: 68405 Visits: 18570
Koen Verbeeck (4/3/2012)
Easy one, thanks!


Agreed



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

Alex Fekken
Alex Fekken
Old Hand
Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)Old Hand (385 reputation)

Group: General Forum Members
Points: 385 Visits: 460
Thanks for rubbing it in again :-)

And I MUST apologise for calling this a bug in another discussion: I have checked some other database engines (Firebird, trying it, and MySQL, reading some specs) and they show the same behaviour. So perhaps it *is* even prescribed by the standard?

Must be just me then not getting why this makes any sense... (walking away in shame, throwing this experience in my "don't think of SQL as a real programming language" bucket)
Toreador
Toreador
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3869 Visits: 8128
All three answers are in fact correct.

"Returns from step 4 Returns 5 columns and 2,155 rows of data" is true - it returns 5 columns and also another column.




Whistling
Hugo Kornelis
Hugo Kornelis
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19117 Visits: 12426
I'm a bit surprised to see the question asking for two answers (one about step 2, one about step 4), and only one answer option for step 2. Why not simply omit that part, present two answer options for step 4, and make us choose the correct one?
(Or, better yet, provide more answer options for step 2).

Or was the question changed to remove an error before I got here?


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Mike Palecek
Mike Palecek
SSC Eights!
SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)

Group: General Forum Members
Points: 948 Visits: 823
Nice easy question, but it really does make you think about what is happening with views.
Mike Dougherty-384281
Mike Dougherty-384281
SSC Eights!
SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)SSC Eights! (854 reputation)

Group: General Forum Members
Points: 854 Visits: 944
I thought "Select *" was banned from production environments for this (and other) reasons.

Are we saying it is acceptable for View definitions with the caveat that someone remembers to update the definition after a schema change? Wouldn't a schema-bound view make that update more reliable (preventing the change to schema alerts the DBA that the view exists)

It's a good question; common enough that many would/will encounter the scenario.
I am curious how we feel about using "select *" in this way.
Mike Palecek
Mike Palecek
SSC Eights!
SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)SSC Eights! (948 reputation)

Group: General Forum Members
Points: 948 Visits: 823
I do not think this was saying it was acceptable, but just used to demonstrate how the view is created. That even though * was used the SQL Engine still used a full query definition and not the column wildcard (which could logically be expected).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search