KavJack
Programmer
- Apr 1, 2001
- 46
KavJack (Programmer) Jan 7, 2002
The following code returns a year and a count.
SELECT CUPALL2.YR, IIf (
IsNull (Count(*)) ,0, Count(*) )
FROM CUPALL2
WHERE CUPALL2.YR>1944 AND CUPALL2.RD="R3" AND
CUPALL2.RP Is Null AND
( (CUPALL2.L1="N"
OR (CUPALL2.L2="N"
)
GROUP BY CUPALL2.YR;
However, for year 1951, there are no values. My SQL returns
1946 1
1947 1
1948 2
1949 1
1950 3
1952 2
1953 2 etc.
But for 1950 there is no line. How do I get the code to return "1951 0" ? I have checked back answers on this forum, but none seem to work for me. What am I doing wrong ?
The following code returns a year and a count.
SELECT CUPALL2.YR, IIf (
IsNull (Count(*)) ,0, Count(*) )
FROM CUPALL2
WHERE CUPALL2.YR>1944 AND CUPALL2.RD="R3" AND
CUPALL2.RP Is Null AND
( (CUPALL2.L1="N"
GROUP BY CUPALL2.YR;
However, for year 1951, there are no values. My SQL returns
1946 1
1947 1
1948 2
1949 1
1950 3
1952 2
1953 2 etc.
But for 1950 there is no line. How do I get the code to return "1951 0" ? I have checked back answers on this forum, but none seem to work for me. What am I doing wrong ?