darrenburgess

Odd ExecuteSQL result

Discussion created by darrenburgess on Jan 10, 2013
Latest reply on Jan 10, 2013 by beverly

Here is an interesting result and I wonder if the smarties out there have an explanation. The following SQL statement returns the logged in account name for the file. Now normally I would expect that using an SQL reserved word would cause the calc to fail and return '?'. USERNAME is an SQL reserved word and is also a field in the table EmailSMTPSettings. This field contains different data than is returned by the SQL statement. The SQL does of course return the correct result if I change the field name to avoid the reserved word.

 

Let([

query = "

SELECT UserName

FROM EmailSMTPSettings

" ;

 

sql = ExecuteSQL ( query ; ", " ; "" )

 

] ;

 

sql

 

)

 

 

Darren Burgess

http://www.mightydata.com

Outcomes