Runtime error on testing SQL
Application Type
Mobile

Hi All,


I am getting the below error on testing a SQL within Outsystems. Any suggestions why this might be happening please would really help:

Solution

In addition:  check your SQL as well. 

Select * from {Credential}.*

should be

Select {Credential}.* from {Credential}

regards Hans


Yup, that should be the fix. I just did a quick test and showed a similar error.

Regards,

Luis Oliveira

Hi Luis, Hans

Thanks, that solved, just one more query. I query the database in "Data" view and it returns me the below as the result: 

However, running the SQL for same returns me the below result set, any thoughts why the system is reading the Id value as Email Address and the email value as the Password. 


Hi Jayant,

That is happening because your structure only has 2 fields. Since the output returns the first 2 and discards the others, that's why it shows only those.

If you want to output the email and password, you should put 

Select {Credential}.[email],{Credential}.[password]

from {Credential}

Hi Jayant,

That is happening because your structure only has 2 fields. Since the output returns the first 2 and discards the others, that's why it shows only those.

If you want to output the email and password, you should put 

Select {Credential}.[email],{Credential}.[password]

from {Credential}

Solution

In addition:  check your SQL as well. 

Select * from {Credential}.*

should be

Select {Credential}.* from {Credential}

regards Hans


Yup, that should be the fix. I just did a quick test and showed a similar error.

Regards,

Luis Oliveira

Hi Luis, Hans

Thanks, that solved, just one more query. I query the database in "Data" view and it returns me the below as the result: 

However, running the SQL for same returns me the below result set, any thoughts why the system is reading the Id value as Email Address and the email value as the Password. 


Hi Jayant,

That is happening because your structure only has 2 fields. Since the output returns the first 2 and discards the others, that's why it shows only those.

If you want to output the email and password, you should put 

Select {Credential}.[email],{Credential}.[password]

from {Credential}

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.