ms access - Why won't my "WHERE" statements work in sql? -
i have ms access database 40 similar tables. couple listed below simplicity. want grab 3 cells of data row if date in row yesterday. data comes other employee's homebrew spreadsheets refuse give up. can't change column names or them on same workbook template. i've tried variations on code below can't dates work right. if drop statement returns everything. need whittled down. in advance!
select [customer name],[$ amount], [quote completed] 1081 [quote completed] = date()-1 union select [customer name],[$ amount], [quote completed] 1145 [quote completed] = date()-1 union select [customer name],[$ amount], [quote completed] 1149 [quote completed] = date()-1 union select [customer name],[$ amount], [quote completed] 1228 [quote completed] = date()-1 union select [customer name],[$ amount], [quote completed] 1353 [quote completed] = date()-1 ;
do need condition on each section of union? or want whole results filtered?
select * ( select [customer name],[$ amount], [quote completed] 1081 union select [customer name],[$ amount], [quote completed] 1145 union select [customer name],[$ amount], [quote completed] 1149 union select [customer name],[$ amount], [quote completed] 1228 union select [customer name],[$ amount], [quote completed] 1353) u [quote completed] = date()-1
Comments
Post a Comment