0% found this document useful (0 votes)
39 views1 page

Code

This SQL query selects the short roll number and sums the amounts due from the MGMT table, grouping by short roll number. It uses an IIf statement to label the result "NODUE" if the sum of due amounts is less than or equal to 0, and "DUE PENDING" if the sum is greater than 0.

Uploaded by

tsk4b7
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views1 page

Code

This SQL query selects the short roll number and sums the amounts due from the MGMT table, grouping by short roll number. It uses an IIf statement to label the result "NODUE" if the sum of due amounts is less than or equal to 0, and "DUE PENDING" if the sum is greater than 0.

Uploaded by

tsk4b7
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT MGMT.SHORTROLLNUMBER, Sum(MGMT.

DUE) AS DUESUM, IIf([DUESUM]<=0,"NODUE","D


UE PENDING") AS IST
FROM MGMT
GROUP BY MGMT.SHORTROLLNUMBER;

You might also like