Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««123»»

VIEWS 5 Expand / Collapse
Author
Message
Posted Tuesday, April 03, 2012 9:44 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:53 AM
Points: 1,176, Visits: 778
tks for the question.

Wonder how many would have jumped at "6 columns" for STEP 2 if it were an option...
Post #1277430
Posted Tuesday, April 03, 2012 12:17 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 11:17 AM
Points: 5,471, Visits: 23,519
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
Post #1277542
Posted Tuesday, April 03, 2012 2:25 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, August 09, 2012 3:15 PM
Points: 84, Visits: 29
I <newbie> also hesitated before submitting, but got it. I'd heard some discussion regarding this from some of my peers...
Post #1277655
Posted Tuesday, April 03, 2012 5:52 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 10:21 AM
Points: 20,462, Visits: 14,089
Koen Verbeeck (4/3/2012)
Easy one, thanks!


Agreed




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


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1277721
Posted Wednesday, April 04, 2012 1:46 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, July 29, 2013 7:03 PM
Points: 197, Visits: 457
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)
Post #1277831
Posted Wednesday, April 04, 2012 4:20 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 7:26 AM
Points: 1,658, Visits: 6,002
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.




Post #1277877
Posted Wednesday, April 04, 2012 4:30 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 10:24 AM
Points: 5,794, Visits: 8,009
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
Post #1277883
Posted Wednesday, April 04, 2012 6:32 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 8:26 AM
Points: 845, Visits: 713
Nice easy question, but it really does make you think about what is happening with views.
Post #1277976
Posted Wednesday, April 04, 2012 7:27 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 11:13 AM
Points: 257, Visits: 901
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.
Post #1278036
Posted Wednesday, April 04, 2012 7:32 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 8:26 AM
Points: 845, Visits: 713
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).
Post #1278047
« Prev Topic | Next Topic »

Add to briefcase ««123»»

Permissions Expand / Collapse