raykennedy

Trying to figure out ExecuteSQL

Discussion created by raykennedy on Sep 19, 2015
Latest reply on Sep 20, 2015 by raykennedy

Here is another question on attempting to use ExecuteSQL. These scripts are in a calculating field set to text which is the result that I am looking for. I did verify all values being used exist. Eventually I will be using a dynamic value with phoID but for now I am hardcoding the number 11 for testing purposes which represents a specific record in the PHONE table.

 

THIS ONE WORKS FINE...

ExecuteSQL ( "SELECT PHONE.phoNumber FROM PHONE WHERE PHONE.phoType = 'Fax'" ; "" ; "")

 

 

THIS ONE DOESN'T... (phoID is a number)

ExecuteSQL ( "SELECT PHONE.phoNumber FROM PHONE WHERE PHONE.phoID = 11" ; "" ; "")

 

THIS ONE DOESN'T EITHER... (phoID is a number but I tried putting it in single quotes, just to see if it made a difference)

ExecuteSQL ( "SELECT PHONE.phoNumber FROM PHONE WHERE PHONE.phoID = '11'" ; "" ; "")

 

Am I missing something obvious?

Outcomes