Skip to content

Instantly share code, notes, and snippets.

@dfgrumpy
Created September 20, 2022 05:49
Show Gist options
  • Save dfgrumpy/0ed44b1d49bb20f0420fcc3aa21bcd17 to your computer and use it in GitHub Desktop.
Save dfgrumpy/0ed44b1d49bb20f0420fcc3aa21bcd17 to your computer and use it in GitHub Desktop.
private struct function myFunction() {
var qryData = queryExecute(
"SELECT TOP 1 CAST( coreDate as date ) AS lastCoreDate, *
FROM coreData
WHERE coreDate IS NOT NULL
AND (
(
subID = :subID
AND coreName = :coreName
) OR (
coreName = :coreName
AND corelocation = :coreLocation
)
)
ORDER BY coreId DESC
",
{
subID: arguments.subID,
coreName: arguments.coreName,
coreLocation: arguments.coreLocation
}
);
return qryData;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment