What ever I try I see the above error message. I copy text or type it myself.
Anyone a hint where to look ?
I will include both my .oml files
Roelof
Hey Roelof,
I think it might be a problem with Unicode characters: did you copy the query directly from this thread page?
All spaces (U+0020) are showing as zero-width spaces (U+200B), and it might be confusing the true-change parser and giving you a warning.
Try writing Benjith's query by hand in your advanced query, and it should go away.
and here the second :
Hi Roelof,
Doing advanced queries with a SELECT * is dangerous - the order of the fields within can change and cause errors.
Even with that, you're trying to cast the result of SELECT * FROM {PERSON} into a structure with different fields (PersonId and Fullname - these don't match with the fields of the Person Entity). Try changing your query to something like this:
SELECT {Person}.[Id], CONCAT({Person}.[Name], ' ', {Person}.[SurName]) FROM {Person}
Thanks, I try that to find out where my error was coming from. Even with your sql I see this warning :
Unexpected SQLUnexpected '' in SQL statement of GetCastAndCrew. Recheck the SQL to make sure it is valid
and still I cannot find where its coming from. IM following the web programm course.
I rechecked also all variables have the right type and that seems to be.
OutSystems best practice recommends to use Aggregate instead of Advance Query (You can achieve the same with Aggregate - Just for info).
SyntaxEditor Code Snippet
SELECT {Person}.[Id], {Person}.[Name] + ' ' + {Person}.[Surname] FROM {Person} INNER JOIN {PersonMovieRole} ON {Person}.[Id] = {PersonMovieRole}.[PersonId] WHERE {PersonMovieRole}.[PersonRoleId] = @PersonRole and {PersonMovieRole}.[MovieId] = @MovieId
Hope it helps.
Kind Regards,
Benjith Sam
I know but the web development course wants me to teach it with SQL :(
wierd, I get the warning but all seems to be working right. Did I maybe hit a big in the beta version or is there someting wrong what I cannot see.
I will include my last version
it did not. I typed in :
SELECT {Person}.[Id] FROM {Person}
and still this annyoing warning
Even if I have no sql in that part I see the error.
Did you delete the Advanced Query itself and then recreate it? I noticed it's very hard to stop it from recognising the characters once it happens.