AnsweredAssumed Answered

ExecuteSQL and fields named "user" or "username"

Question asked by jcooper on Dec 18, 2018
Latest reply on Dec 18, 2018 by beverly

In a table Users where I have these fields (among others):

 

 

_tModificationAccount     text     Autoenter Accountname

Username                         text

 

I run this ExecuteSQL:

 

"select Username from Users"

 

It returns the _tModificationAccount fields.

If I change the filename to "User", the same thing happens.

If I change it to "shortname" it returns correctly.

 

Quoting the fieldname seems to be the workaround,

 

"select " & quote("Username") & " from Users" returns the proper column.

 

but why is it returning the other column in the first place?

 

Is it me? I find this very strange.

 

Thanks,

 

Jeff

Outcomes