H
H
I have a select query that looks for the last trade price for a specific
criteria, see SQL below, however if there is nothing traded under this
criteria, I want it to show a zero rather than null data...I have tried to
use nz() to no avail, any ideas?
SELECT DISTINCT TOP 1 Trd.Price, Trd.DateTimeTrade, Trd.AddTerms1
FROM Trd
WHERE (((Trd.Price)>5) AND ((Trd.DateTimeTrade)>#1/1/2008#) AND
((Trd.AddTerms1)="Aug-09") AND ((Trd.Product) Like "ttf*") AND
((Trd.Action)="insert"))
ORDER BY Trd.DateTimeTrade DESC , Trd.AddTerms1;
criteria, see SQL below, however if there is nothing traded under this
criteria, I want it to show a zero rather than null data...I have tried to
use nz() to no avail, any ideas?
SELECT DISTINCT TOP 1 Trd.Price, Trd.DateTimeTrade, Trd.AddTerms1
FROM Trd
WHERE (((Trd.Price)>5) AND ((Trd.DateTimeTrade)>#1/1/2008#) AND
((Trd.AddTerms1)="Aug-09") AND ((Trd.Product) Like "ttf*") AND
((Trd.Action)="insert"))
ORDER BY Trd.DateTimeTrade DESC , Trd.AddTerms1;