Hi.
Since following error, I'm not able to publish the application.
I would appreciate if you help me..
If you need anything to solve this problem, please tell me.
Thank you.
Hi Seheon,
This is an aggregate query you cannot change that, you need to share the aggregate and the filter conditions that you are using.
Otherwise convert aggregate into SQL.
https://success.outsystems.com/documentation/11/developing_an_application/use_data/query_data/sql_queries/
Best to share the OML. That will be helpful
Thanks
Hi neha rathore
Thank you for your support.
I think this error is because of following filter.
When I remove above filter, error didn't occured.
best regards
Oh great.. mark this as solution then
hi read this:
https://www.sqlshack.com/understanding-sql-server-case-statement/
and don't forget to put single quote if it is a text.
Hi @Seheon,
Can you provide an SQL statement here about what you are trying it? SO we can find where you have written wrong.
Hi Rahul
Thank you for your reply.
SQL statement is following
SELECT TOP (17) [ENTEAM].[ID] [ID], [ENTEAM].[NAME] [NAME], (CASE WHEN ([ENSHAREPOINT].[ID] IS NOT NULL) THEN 1 ELSE 0 END) [SHAREBOOL], [ENSHAREPOINT].[ID] [SHAREPOINTID]
FROM ([OSDEV1].dbo.[OSSYS_GROUP_T20] [ENTEAM]
FULL JOIN [OSDEV1].dbo.[OSUSR_4MS_SHAREPOINT] [ENSHAREPOINT] ON ([ENTEAM].[ID] = [ENSHAREPOINT].[TEAMID]))
WHERE (([ENSHAREPOINT].[TYPE] = N'SkillUp')
AND ([ENSHAREPOINT].[SKILLUPPLANID] IS NULL))
GROUP BY (CASE WHEN ([ENSHAREPOINT].[ID] IS NOT NULL) THEN 1 ELSE 0 END), [ENTEAM].[ID], [ENSHAREPOINT].[ID], [ENTEAM].[NAME]
Thank you for your help.
hi,
Do u use Query Advance widget, If yes,
please set its Expand inline property to Yes
Dear ibox,
Thank you for reply.
But I can find Expan Inline on my application.
Where can I find that?
Best regards.
Hi Seheon Oh,
You can achieve the same result with separate conditions and a union clause, something like this
SELECT TOP (17) [ENTEAM].[ID] [ID], [ENTEAM].[NAME] [NAME], 1 [SHAREBOOL], [ENSHAREPOINT].[ID] [SHAREPOINTID]
AND [ENSHAREPOINT].[ID] IS NOT NULL
GROUP BY 1, [ENTEAM].[ID], [ENSHAREPOINT].[ID], [ENTEAM].[NAME]
UNION
SELECT TOP (17) [ENTEAM].[ID] [ID], [ENTEAM].[NAME] [NAME], 0 [SHAREBOOL], [ENSHAREPOINT].[ID] [SHAREPOINTID]
AND [ENSHAREPOINT].[ID] IS NULL
GROUP BY 0, [ENTEAM].[ID], [ENSHAREPOINT].[ID], [ENTEAM].[NAME]
Hope that it helps you
Hi Alexandre Yip.
But would you tell me where can I modify sql state?
It seems that I cannot modify on below screen.
Best regards
You need to use sql advance query
Check out here how to use
https://www.outsystems.com/forge/component-overview/10200/sql-advanced-query-samples-for-dummies
Regards
Hi i think this forum question is too fat, the topic goes wildly not in a single minded problem. So it is better to open another question, not to surrogate this one.
regards