Hi All,
So I'm trying to display data in two columns, EstimatedIncentive and ActualIncentive, from my Projects table. Now if the project Milestone (p.MileStone) is not 'Filed' then we show the EstimatedIncentive amount and the ActualIncentive should show blank field instead of the default. The default in our DB is 0 and we don't want to show that, since we don't want to confuse the user and have them think they might not be getting $. If the Project Milestone is 'Filed' we want to show the EstimatedIncentive and keep the ActualIncentive blank. Also if a project status (p.Status) is 'TERMED' we want to show a 0 in the EstimatedIncentive amount field.
This is simple enough to do in T-SQL with case statement but when I try to use those T-SQL statements in AlphaDAO query builder I get an error:
Error parsing SQL statement
Your database has returned the following error code and description to Alpha Five.
Consult your database documentation for further information.
901 - 'line 4:22: unexpected token: ='
I can still execute the query but it seems to mess everything up and I have to prefetch all the grid data then specify a link field and who knows what else.
I just wanted to know if there was an issue with using T-SQL in AA and also if there is a way to change these conditional values after running the query in the Grid settings or an xbasic event.
So I'm trying to display data in two columns, EstimatedIncentive and ActualIncentive, from my Projects table. Now if the project Milestone (p.MileStone) is not 'Filed' then we show the EstimatedIncentive amount and the ActualIncentive should show blank field instead of the default. The default in our DB is 0 and we don't want to show that, since we don't want to confuse the user and have them think they might not be getting $. If the Project Milestone is 'Filed' we want to show the EstimatedIncentive and keep the ActualIncentive blank. Also if a project status (p.Status) is 'TERMED' we want to show a 0 in the EstimatedIncentive amount field.
This is simple enough to do in T-SQL with case statement but when I try to use those T-SQL statements in AlphaDAO query builder I get an error:
Error parsing SQL statement
Your database has returned the following error code and description to Alpha Five.
Consult your database documentation for further information.
901 - 'line 4:22: unexpected token: ='
I can still execute the query but it seems to mess everything up and I have to prefetch all the grid data then specify a link field and who knows what else.
I just wanted to know if there was an issue with using T-SQL in AA and also if there is a way to change these conditional values after running the query in the Grid settings or an xbasic event.
Comment