Follow

Retrieve the content of a given non indexed field

This function returns the content of a given field from a given Table if a given value exists in a specified field.

Syntax:

GetValueSQL(<vValueToSearch>, <cFieldToSearch>, <cFieldToReturn>, cTableToSearch>)

 

Parameter

Description

vValueToSearch

Specifies the value to be searched for.

cFieldToSearch

Specifies the Field in which the value vValueToSearch has to be searched for.

cFieldToReturn

Specifies the field whose content has to be returned.

cTableToSearch

Specifies the table in which both the fields cFieldToSearch and cFieldToReturn are located.

Remark:

The syntax of this function is almost the same as GetValue.

 

The difference between these two functions consists in the fact that :

 

GetValueSQL() is faster than GetValue() if cFieldToSearch and cFieldToReturn are not both covered by indexes.

 

GetValue() is slightly faster than GetValueSQL() if cFieldToSearch and cFieldToReturn are both covered by indexes.

Example:

*/ Show the 1st address line for an address whose Company Name is "Company Name".

GetValueSQL("Company Name", "ad_societe", "ad_rue1", "adresses")

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments