• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

HFE PAGE 430:QUESTION 17

 
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
 
Ranch Hand
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please post the question?
 
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 ]
 
I didn't say it. I'm just telling you what this tiny ad said.
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic