February 4, 2010 at 6:51 am
bitbucket-25253 (2/1/2010)
I think that the QOD has two equally valid values.1. To allow individuals to test their knowledge.
2. To teach.
For those who know the answer it is a re-assuring experience
For those who do not know the answer, running the code teaches them something (at least I hope it does)
Hear, Hear
I thought it was a sort of 'trick' question and so answered 0,1 :crying:
Then I ran it to check and used QA on SQL2K it returned 0,1 :laugh:
Then I noticed the 2005/2008 reference, damn :angry:
Ran QA on 2005 and it returned 0,1
Mmmm, thinks.... :rolleyes:
Ran SSMS on 2005, returned 1,1 :w00t:
Ran SSMS on 2000, returned 0,1 :crazy:
So the moral is...
If 2005/2008 is mentioned use SSMS
But I'm not complaining, learned something, and so, is worth more than 1 point
Far away is close at hand in the images of elsewhere.
Anon.
February 4, 2010 at 4:29 pm
Not sure what I'm learning from this.
Got 0, 1 when I first executed the 2 select lines in SSMS 2008 connecting to SQL Server 2005 - typed into a query window which had already executed some code.
Got 1,1 in the same setup and instance when I executed the 2 lines into a freshly opened query window.
Got 1, 1 when I first ran the 2 lines in a SSMS 2005 to SQL Server 2005.
Some people care about the percentage of right answers to QOD ...
February 9, 2010 at 7:45 pm
I've got (3, 1) becuase my latest query returned 3 rows.
February 11, 2010 at 8:25 am
I can see by the discussion thread that the answer was initially 0,1 - which was my answer. I got it wrong. The answer is now 1,1. I tested this on SQL 2000 and SQL 2005 using the same methodology. That is - I started query manger / management studio and did nothing else but run the query. SQL 2000 returned 0,1 SQL 2005 returned 1,1.
This was a good question but unfortunately it would have been excellent if the version of SQL were specified.
:hehe:
March 12, 2010 at 5:55 pm
Hi,
I ran this code in already opened SSMS windows and got 0,1 which is a wrong answer but later on I got 1,1...
Can't seem to understand why I got 0,1 in the first run? I'm sure the connection to the db was active not disconnected.
Razi, M.
http://questivity.com/it-training.html
March 19, 2010 at 3:10 am
I got the different result sets in SQL 2005 and 2008. In 2005, I always getting output (1,1) whether it is a new (first) connection or new query window is open, but in case of SQL 2008, If it is new (first) connection then the output will be (1,1) but if it is new query window through the existing connection then it is (0,1)
March 19, 2010 at 4:03 am
The result of the first Select @@RowCount depends upon the last query executed in the session.
I tried it in different ways;
1. Executed query that returned n number of rows and then executed the two statements and the result was (n,1)
2. I executed print '1' statement and then executed the two statements and the the result was (0,1).
but the BOTTOM LINE is ....
Lost my point....
March 30, 2010 at 10:11 am
Well, that taught me something new!
May 26, 2010 at 11:07 pm
the result depends on previous statement.
June 17, 2010 at 3:25 am
I also executed the query in sql server 2005 query analyzer but i got (0,1) as the output.
Viewing 10 posts - 121 through 130 (of 130 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy