Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Passthrough OPENQUERY() with date
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01201531
Message ID:
01201638
Views:
17
When I need to index DATE field I always index it with DTOS().


>You would have to have an index on DTOS on date, not the simple date index then.
>
>>>Wait...there are not 31 days in November! That is why it returns blank.
>>>I retract my question.
>>
>>:o))))
>>I just start to give you another solution when I realize that you ask about 31 Nov :o))))
>>But I'll give it, because I prefer it:
>>
>>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 DTOS(d.award_date) > [20061130]
>>		ORDER BY d.bid_no, d.bid_dash''
>>		) Rowset_1'
>>
>>--SELECT @SQL
>>EXEC (@SQL)
>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform