Two things:
1- I use in various other views and it works fine.
E.g.
===================================
CREATE SQL VIEW "VDIET" ;
AS SELECT NVL(Client.lname,Space(25)) AS lname, ;
NVL(Client.fname,Space(25)) AS fname, ;
Diet.fk_client, ;
Diet.pk_diet ;
FROM hifis!diet ;
INNER JOIN hifis!CLIENT ON Client.pk_client = diet.fk_client ;
WHERE Diet.fk_Client = ?Client.pk_Client ;
ORDER By 1,2
===================================
2- I considered pre-assigning the field to a variable in the view definition
but shouldn't the var be PUBLIC then? A property of a global object, perhaps?
Thx,
Henry
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dave Crozier
Sent: 2008-01-24 2:33 PM
To: [EMAIL PROTECTED]
Subject: RE: Parametized WHERE clause (VFP9)
Henry,
You need to put a memory variable after the ? not a table field.
Dave Crozier
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of [EMAIL PROTECTED]
Sent: 24 January 2008 18:47
To: [email protected]
Subject: Parametized WHERE clause (VFP9)
Any idea why this SQL is returning nothing?
If I replace '?Client.pk_Client' with its value, 102, I get exactly what I
need.
I use this ?Client.pk_Client often in other view and have no problem.
==============================================
Select Client.Lname, Client.Fname, ;
Lookups.DescEng As LKCfIntE, ;
Lookups.DescFr As LKCfIntF, ;
Conflict.pk_conflic ;
From Conflict ;
Inner Join Client On Client.pk_client = Conflict.fk_client2 ;
Inner Join Lookups on Conflict.fk_lkcfint = Lookups.pk_lookups ;
Where Conflict.fk_client1 = ?Client.pk_Client ;
And Between(Date(),Conflict.DatStart,Conflict.DatEnd)
==============================================
Henry
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.