How to show previous day values in query
Posted
by Hakan
on Stack Overflow
See other posts from Stack Overflow
or by Hakan
Published on 2010-06-01T19:15:11Z
Indexed on
2010/06/08
17:32 UTC
Read the original article
Hit count: 269
I am going to be crazy I think. Please Help.
I have a table which fields are Date, No, Turnover, TotalWin, Opencredit, Handpay, Billin, gamesplayed and I am trying to write sql in vb.net that will show me previous day value but I cant. Here is what I am trying to do.
SELECT Meter.*
FROM
Meter AS Previous,
Turnover As Prev_turnover
WHERE Date = '
SELECT Max(Date)
FROM Meter AS Previous2
WHERE Previous2.Date < Date
AND Previous2.No = ‘No'
AND Previous.No = ‘No’
What is wrong in where I am doing mistake I really don't know. If anyone help will be appreciated.
Thanks
© Stack Overflow or respective owner