Home » Infrastructure » Windows » SQL QUERY  () 1 Vote
SQL QUERY [message #294065] Wed, 16 January 2008 05:38 Go to next message
Messages: 2
Registered: January 2008
Location: PUNE
Junior Member

What is the meaning of the below statement

IIF( InStr([Compensation_Component_Name]," Annual Attainment") = 0,
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: 63910
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
This is VB code and not SQL or PL/SQL one.

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



[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 Oct 21 11:40:47 CDT 2016

Total time taken to generate the page: 0.05850 seconds