Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Substring comprehension


Substring comprehension

Author
Message
fzaynoun
fzaynoun
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 58
A empty not null. Substring returns null only if expression is null.
Ronzo
Ronzo
Mr or Mrs. 500
Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)Mr or Mrs. 500 (553 reputation)

Group: General Forum Members
Points: 553 Visits: 741
Toby White (11/2/2009)
Even though A is empty string versus Null the answer is still obvious given that it is multiple choice. In other words it was obvious that the author had just made a mistake between empty/null since options A and C were so far off.


So...
Always assume that there is a right answer, and if none of the above is not shown, try and figure out which answer would be right assuming the author made a mistake.
Don't like this logic at all. It may result in your passing the test, but it requires you to try and figure out what the author "meant" the answers to be.
I used logic that went like this... if you know two of the answers are wrong, go with the one that might be right (i.e. error). Of course my "logic" failed and yours succeeded, this time. :-D


Have Fun!

Ronzo

TomThomson
TomThomson
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10656 Visits: 11989
As some previous commenters did, I got this right by guessing what the questioner had got wrong.

Tom

Frédéric van der Plancke
Frédéric van der Plancke
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 38
Toby White (11/2/2009)
Even though A is empty string versus Null the answer is still obvious given that it is multiple choice. In other words it was obvious that the author had just made a mistake between empty/null since options A and C were so far off.


Except that A is not so far off. I thought along this line: this first select returns the empty string, I don't know what the second one does, but no answer has "this first select returns the empty string", so the only compatible answer is A: error.

Not nice.
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