Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFE PAGE 430:QUESTION 17

 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what does option A mean...the single_valued_path_expression must have a string value
can anybody explain?
please help
thanks
 
Andres Gonzalez
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please post the question?
 
Keith Rosenfield
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Pradeep,
To answer this question you should understand IN expressions. An IN expression allows you to determine if a particular string is a member of a set of strings. The IN expression evaluates to true if the string preceding the IN operator is a member of the set of strings following the IN operator or evaluates to false otherwise.
For example:
o.country IN (�UK�, �US�, �France�)
In this case o.country is a single_valued_path_expression. What is a single_valued_path_expression? This is just an expression that evaluated to a single value rather than a collection. In the case of IN expressions it only makes sense that the single_valued_path_expression evaluates to a string value, because you are testing for membership amoung a set of strings. The string that o.country represents is tested for membership in the set of strings that follow the IN.
The following from the spec make help clarify things:
11.2.7.8 In expressions
The syntax for the use of the comparison operator [NOT] IN in a conditional expression is as follows:
single_valued_path_expression [NOT] IN (string-literal [, string-literal]* )
The single_valued_path_expression must have a String value.


Hope this helps.
[ February 13, 2004: Message edited by: Keith Rosenfield ]
[ February 13, 2004: Message edited by: Keith Rosenfield ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic