Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Remote View Problem with PostgreSQL on Linux (Crossp
Message
 
À
05/03/2001 14:55:11
Liam O'Hagan
O'Hagan Programming Ltd
Irlande
Information générale
Forum:
Linux
Catégorie:
Problèmes base de données et Admin
Divers
Thread ID:
00481245
Message ID:
00482764
Vues:
5
Liam,
Here is that problem with VIEW. Like you, I had to resort to a code solution.
JLK
I had created a view using the view designer but couldn't persuade it to form the syntax of the SQL statement the way I wanted it to be.   In order to solve this parsing problem in the view designer I had to use CREATE VIEW command in the command window:
CREATE SQL VIEW lv_lt2000 AS SELECT Persinfo.proprty_id, Persinfo.batch, Persinfo.rpt,;
  Persinfo.appstatus, Persinfo.ssn, Persinfo.name, Persinfo.app_type,;
  Persinfo.hec, Persinfo.yoba, Persinfo.part, Persinfo.p1line2,;
  Persinfo.p2line2, Persinfo.totincome;
 FROM homested!persinfo;
 WHERE Persinfo.appstatus = "OK";
   AND (Persinfo.yoba BETWEEN 1 AND 1932 OR Persinfo.syob BETWEEN 1 AND 1932);
   AND ((Persinfo.part = 1 AND Persinfo.p1line2+Persinfo.p1line3 < 2000);
   OR (Persinfo.part = 2 AND Persinfo.p2line2+Persinfo.p2line3 < 2000));
 ORDER BY Persinfo.batch, Persinfo.rpt
 
*!*	Below is what the view builder displays if you look at the VIEW, 
*!* and STORES if you save the view, instead of just closing it:
*!*
*!*	SELECT Persinfo.proprty_id, Persinfo.batch, Persinfo.rpt,;
*!*	  Persinfo.appstatus, Persinfo.ssn, Persinfo.name, Persinfo.app_type,;
*!*	  Persinfo.hec, Persinfo.yoba, Persinfo.part, Persinfo.p1line2,;
*!*	  Persinfo.p2line2, Persinfo.totincome;
*!*	 FROM homested!persinfo;
*!*	 WHERE Persinfo.appstatus = "OK";
*!*	   AND Persinfo.yoba BETWEEN 1 AND 1932;
*!*	   OR (Persinfo.syob BETWEEN 1 AND 1932;   <--- notice the "("
*!*	   AND Persinfo.part = 1;
*!*	   AND Persinfo.p1line2+Persinfo.p1line3 < 2000);  <-- notice the ")"
*!*	   OR (Persinfo.part = 2;			<-- ditto
*!*	   AND Persinfo.p2line2+Persinfo.p2line3 < 2000);  <-- ditto
*!*	 ORDER BY Persinfo.batch, Persinfo.rpt
 
*!*	 The view designer used standard boolean logic to parse the data in the
*!*  view setup form and gives a SQL select that is different from what was 
*!*  intended.  I couldn't trick the view designer into putting the "("
*!*  in front of the first AND and after the second "1932".
 
*!** P.S. - Don't ask about the hardcoded dates unless you can
*!** explain why report, when using this as a parameterized view,
*!** prompts for the ?year65 variable for each page of the report.
>Hi Jerry,
>
>Thanks for your reply. I should have been more specific in my post - I'm not trying to create PostgrSQL views, I'm trying to create VFP views against a PostgreSQL DB.
>
>It appears, from observation, that there may be a problem with the VFP View Designer - which I would not normally use except for the most simple views. However, on this occasion I was trying to build just that, a very simple view.
>
>I have since found that I can create VFP views against the PostgreSQL DB by creating them programmatically. I can modify them afterwards in the view designer.
>
>It's a strange one, but now that I know what to avoid (the View Designer) I can get back to my testing.
>
>Regards,
>
>Liam
>
>
>
>
>
>>>Liam,
>>>What are your view rules on PosgreSQL? You've proabaly already read this but..
>>>http://www.postgresql.org/devel-corner/docs/postgres/rules-views.html
>>>noting section 16.2.5.
>>>JLK
>>>DISCLAIMER: I use PostgreSQL without Linux. I've yet to do what you are trying.
>>>
>>TYPE ALERT!!! I use PostgreSQL with Linux... :-(
Nebraska Dept of Revenue
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform