Home » Infrastructure » Windows » SQL QUERY  () 1 Vote
SQL QUERY [message #294065] Wed, 16 January 2008 05:38 Go to next message
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 #294068 is a reply to message #294065] Wed, 16 January 2008 05:43 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is VB code and not SQL or PL/SQL one.

Regards
Michel
Re: SQL QUERY [message #294127 is a reply to message #294065] Wed, 16 January 2008 09:51 Go to previous message
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

Previous Topic: Changing SID
Next Topic: SQL Developer hangs
Goto Forum:
  


Current Time: Fri Mar 29 08:16:15 CDT 2024