Single or double quotation marks is the standerd?

Aggregates & Queries

Hello Everybody,

There is inconsistency between writing query in a SQL statement and writing in an Aggregate "Filter" or in an Expression. While it should be the same logic behind the statement. So if you want to concatenate a name and surname you should use a single quotes in a SQL statement 

while double quotes in a Filter or Expression. It could lead to confusion.

Created on 12 Sep 2018
Comments (4)

Well, a SQL Statement is meant to provide the developer with a way to write SQL, and SQL uses single quotes, so it makes sense to have them there. I'm not sure what another level of abstraction (Entity names are already translated) would add, not to mention that it would be nigh impossible to properly convert existing queries. So though I understand that this would be confusing for someone new to OutSystems, I also don't think this is feasible.

Changed the category to Aggregates & Queries

Thanks Kilian for your comment. Well, the basic statement used in a filter or an aggregate is in fact a SQL query. That is why I think it should hold the same instructions as SQL.

Hi Jimmy,

That depends on what you'd call a "basic statement". Aggregates are abstractions of queries, and e.g. Filters are not 1:1 WHERE clauses. Instead, they follow the Expression syntax used everywhere else in Service Studio. Inside an SQL however, everything is pretty much untranslated SQL, save for the Entity names, so it follows SQL conventions. Not ideal for sure, but then again, SQLs should be avoided in favour of Aggregates whenever possible anyway.