Query Syntax explaination

Salwa

New member
Local time
Today, 12:51
Joined
Oct 10, 2023
Messages
12
Hi all.

Appreciate if someone can tell what the following syntax in a SQl statement is doing and how it actually works!

SuperannuationAmount([SuperID],[SuperInclusive],[Employer%],[SuperableSalary%],[SuperableSalary],[OldSystem],[PrivateSuperAmount],[TotalRemuneration],[AnnualLeaveLoading],[MaximumContribution],[CarAllow],[MaxContribution],[MaximumContribution],IIf(IsNull([MaximumContributionBase]),0,[MaximumContributionBase])) AS FullSuperAmountAnnual

All i can figure out is that the end result is a value, but not how it arrives at that value

same with the following

dblHourlyAmounts([TotalRemuneration],[PayFrequency]) AS FullRemunerationHourly,

I am not an access expert, and have been given a task of reverse engineering business rules for sql statements in access.

Much appreciated for any assistance.

Salwa
 
SuperannuationAmount is a VBA custom (user defined) function. That function is doing something with all those field values that are passed to it as arguments. You need to find that function code and see what it is doing.

Same with dblHourlyAmounts.

Open the VBA editor and do a search for those function names.
 
Hi. Welcome to AWF!

What's the complete SQL statement? Typically, you would take a business rule and code it. It's a little harder to go the other direction. If you knew the business rule, you can use it to verify the code and check if it's working correctly.
 
The statement you presented uses SQL-like syntax but is not a complete SQL statement. It lacks critical elements such as a source table. It is also possible that it lacks other elements such as WHERE or JOIN clauses.

As June7 points out, this code snippet references SuperannuationAmount, which is a foreign function (i.e. not a function native to SQL) that takes fourteen input arguments (one of which is a complex IIF function). We cannot tell you what this does without knowing the source code for the function. It is LIKELY that this is part of a SELECT sequence but even that is uncertain. We cannot answer your question in its current form.
 
Thanks all for your prompt responses.

June7 provided the answer. I found the procedure with the relevant information.
 

Users who are viewing this thread

Back
Top Bottom