• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HFE PAGE 430:QUESTION 17

 
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please post the question?
 
Ranch Hand
Posts: 277
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic