Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Statements
Message
From
06/06/2001 04:59:50
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
SQL Statements
Miscellaneous
Thread ID:
00515604
Message ID:
00515604
Views:
43
When coding a SQL statement for a view, I used the “AS” statement to combine three character fields into one field:

CREATE SQL VIEW lv_contview AS ;
SELECT Contracts.*, Titles.titleno, Titles.itemno, Titles.authorno,;
Titles.titlename, Titles.paythis, Titles.perc_used, Titles.dateroypai,;
Titles.itemname, Titles.tnotes, Authors.authorname,;
contracts.contractno+titles.titleno+titles.itemno as titno ;
FROM contapp!contracts INNER JOIN contapp!titles;
INNER JOIN contapp!authors ;
ON Titles.authorno = Authors.authorno ;
ON Contracts.contractno = Titles.contractno;
ORDER BY Contracts.contractno

The line of interested in is:

contracts.contractno+titles.titleno+titles.itemno as titno

I tried to add DBSETPROP lines in “VIEWS.PRG” but had to remove them due to continual errors. I found that it worked fine as long as the “TITNO" phrase was in the actual SQL statement, with no reference to it in the DBSETPROP statements. I am very keen to know if this is correct, if not what DBSETPROP statements should be added.

Thanks Allan Godney.
Next
Reply
Map
View

Click here to load this message in the networking platform