frequently asked questions

All your questions in one place.

GetValueSQL

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

BODY - RAW

{
       "Method": "GetValueSQL",
       "Parameters": [
             <vValueToSearch>,
             <cFieldToSearch>,
             <cFieldToReturn>,
             cTableToSearch>
       ]
}

PARAMETERS

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.

 

REMARKS

The syntax of this method is the same as GetValue.

The difference between these two methods consists in :

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

After using GetValueSQL() the pointer will not move from the record where it was located before using the method. If you are, as an example, performing a Table Scan on the same table from a script, the use of GetValueSQL will not move the pointer and will not break the continuity of the scan.

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

After using GetValue() the pointer will be on the record in which the result is found. If you are, as an example, performing a Table Scan on the same table from a script, the use of GetValue will move the pointer breaking in this way the continuity of the scan.

EXAMPLE

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

{
       "Method": "GetValueSQL",
       "Parameters": [
             "Company Name",
             "ad_societe",
             "ad_rue_1",
              "adresses"
       ]
}

Did you find this article useful?

0 out of 5 found this helpful