SQL QUERY [message #294065] |
Wed, 16 January 2008 05:38 |
sudhir1981
Messages: 2 Registered: January 2008 Location: PUNE
|
Junior Member |
|
|
Hi,
What is the meaning of the below statement
IIF( InStr([Compensation_Component_Name]," Annual Attainment") = 0,
[Compensation_Component_Name],Trim$(Mid$([Compensation_Component_Name],1,
InStr([Compensation_Component_Name]," Annual Attainment")))) & "(" & [Attainment_Period_Type] & ")"
|
|
|
|
Re: SQL QUERY [message #294127 is a reply to message #294065] |
Wed, 16 January 2008 09:51 |
S.Rajaram
Messages: 1027 Registered: October 2006 Location: United Kingdom
|
Senior Member |
|
|
IIF -> It is a version of If in few languages (I call it Immediate If)
syntax is something like this
IIF(<condition>,expr1, expr2)
So if the condition evaluates to true perform expr1 else expr2
it could be substituted as
If condition
then
expr1
Else
expr2
End If
instr -> search for a pattern in the given string and return the position of the string.
mid$ -> extract from a particular position n number of characters.
"&" -> concatenation in Visual Basic
trim$ -> trims leading and trailing white spaces
Having said that what makes you to ask this question in an Oracle Forum ?
Regards
Raj
[Updated on: Wed, 16 January 2008 09:52] Report message to a moderator
|
|
|