Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Question on View Designer Filtering.
Message
De
17/02/2001 15:22:11
 
 
À
14/02/2001 10:32:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00475680
Message ID:
00477036
Vues:
33
Daniel,

Follow up to previous post to you.

Birthdate was just an example of the date.

Here's my current coding.


CREATE SQL VIEW PropMain_RV ;
CONNECTION Connect01 ;
AS SELECT * FROM propmain Propmain;
WHERE (Propmain.status IN ('A','C','N','X','P','W') ;
AND Propmain.l_off_id IN (2831));
AND DATEDIFF(dd,Propmain.dt_mod,GETDATE()) = 0 ;
ORDER BY Propmain.listing_id
USE PropMain_RV



Thanks in advance!
Roland
==================================================


>Roland,
>
>I don't have a solution for remote views since I don't use them. In case you could use SQL passthrough, the following line should work:
>
>
>SQLEXEC(lnSql, "SELECT whatever FROM MyTable WHERE DATEDIFF(day, BirthDate, getdate()) = 0")
>
>
>As Vlad mentioned, you need to use functions supported by SQL Server (T-SQL) when using SPT.
>
>This is different with remote views. I thought one of the advanteges of remote views was that you can define a view that works with different backends. Therefore I suspect above syntax won't work for RVs. Maybe an expert on remote views can chime in?
>
>>Hi,
>>
>>I am trying to create a filtered remote view using the view designer.
>>
>>FILTER by:
>>
>>dbf.birthdate (This is a SQL DATETIME field) = Today's date
>>
>>Heres what I would like to use.
>>
>>TTOD(dbf.birthdate) = DATE(); but that does not seem to work.
>>
>>I am trying to select records that the birthdate((DATETIME)only the date part) is equal to today's date. I don't know how to express the above to get the view designer to accept the required filter.
>>
>>Could someone please explain the proper usage to accomplish the above filtering.
>>
>>Thanks in advance!
>>Roland
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform