Skip navigation.

Accountancy-ncert-based-Accounting System Using Database Management System:Other Functions

Other  Functions
  (a)  IIF : The purpose of this function is to provide a value to the field from a mutually  exclusive set of values. Its syntax is as given below :

IIIF (<Condition>, Value-1, Value-2)

Wherein  <Condition> refers to any logical expression in which a comparison is  made by using following comparison operators :
  = equal to

<less than

>greater than

<= less than or equal to

>= greater than or equal to

The  condition formed by the above comparison operators is evaluated to result into  TRUE or FALSE.

<Value-1>  This value is returned by IIF() function to the field, if the condition turns  out to be TRUE

<Value-2>  This value is returned by IIF() function to the field, if the condition turns  out to be FALSE

Example  : Suppose a field Type is to return the string of characters .Debit. when its  value is 0 and .Credit. when its value is 1, IIF() function is used as shown  below :

IIF  (Type = 0, .Debit., .Credit.)

(b)  Abs : The purpose of this function is to return absolute value, This function receives  a numeric value as its input argument and returns an absolute value. Consider  the following examples on use of Abs ( ) function :

When  . 84 is given as input argument to Abs(. 84), it returns 84 When 84 is given as  input argument to Abs(84), it returns 84

(c)  Val : The  purpose of this function is to return the numbers contained in a string as a  numeric value of appropriate type. Its Syntax is Val(string) The string  argument of the above Val( ) function is any valid string expression. The Val(  ) function stops reading the string at the first character that cannot be  recognised as number. For example, Val(.12431.) returns the value 12431 by  converting the enclosed string of numerals into value. However, Val (.12,431.)  returns the numeric value 12 because comma after 12 in the enclosed string of  characters in Val ( ) function is not recognised as number.

Share this

Enter your email address:

Delivered by FeedBurner

Design & Developed by Web2business Solution