What happens if you run this query in VFP against the same DataBase and table?
When you get all the records are you sure that d.award_date is not bigger than {^2006-11-31} for all records?
>I am trying to have a WHERE clause on a SQL Passthrough query from SQL 2000 to VFP 7 that filters on a date but it does not seem to evaluate correctly. I get all records back regardless of the date. Here is the code:
>
>
>DECLARE @SQL AS varchar(500)
>SET @SQL = 'SELECT * FROM
> OPENQUERY(VFP_BID,
> ''SELECT d.bid_no
> ,d.bid_dash
> ,d.status
> ,d.item
> ,d.cust_po
> ,d.award_date
> FROM bid_det d
> WHERE d.award_date > {^2006-11-31}
> ORDER BY d.bid_no, d.bid_dash''
> ) Rowset_1'
>
>--SELECT @SQL
>EXEC (@SQL)
>
>
>Any ideas?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.