Strange SQL error

  

Dear all,

strangest thing happened.

Just a very simple SQL (instead of an aggregate); 

"SELECT * FROM {AFDELING}" results in "Error in advanced query SQL1: Input string was not in a correct format".

I'm no expert, but i think i didn't do anything wrong :-)

Has something to do with the integrity of the database? If yes, how to solve?


Kind regards,

me

 

Hello Jeroen,

Please, rewrite the query to have {AFDELING}.* instead of *

This is a problem with the order of the fields that the Select is bringing.

Cheers


Hi Eduardo,

indeed this works, thanks!!

But only one question; Normally my query should work??

Solution

Hello Jeroen

It depends. The system will try to put the first column retrieved in the first column of the output. 

If they match, it will work. If not, like in this case, two things can happen: data in wrong columns, or an error if the data type is not compatible (happened here).

When you use the way I showed, the query sent to database will have each columns specified in the same order than the entity, and thus you always are putting right columns in right columns.

Cheers

Solution

Thanks Eduardo !!