Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Passthrough OPENQUERY() with date
Message
De
07/03/2007 13:02:29
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01201531
Message ID:
01201668
Vues:
15
>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?

I think you have a typo in date. You might prevent the typo using:
>= {^2006/12/1}
Update: Dismiss. I see that you already found the typo.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform