Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Two Small DOC Errors
Message
De
16/08/2006 09:41:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Two Small DOC Errors
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01145979
Message ID:
01145979
Vues:
52
Hi Milind,

according to the documentation in the help file the "replace" and the "SQL-Select" should fail. Actually I think the current behaviour is preferable, so perhaps only minimal changes in the documentation are warranted.
CREATE CURSOR te (n1 I, n2 I, n3 I)
INSERT INTO te VALUES (1, 2, 3)
INSERT INTO te VALUES (4, 5, 6)
INSERT INTO te VALUES (7, 8, 9)

*-- Look! no "," necessary !
*-- Doc says: 
* FieldName1 WITH eExpression1[, FieldName2 WITH eExpression2... ] 
*-- Doc for Fieldlist current BEHAVIOUR would be
* FieldName1 WITH eExpression1[[,] FieldName2 WITH eExpression2... ] 
replace ALL n1 WITH n2 n2 WITH n3 n3 WITH 99 IN te 
*-- just for checking
BROWSE

*-- I actually like this "alternative" syntax 
*-- when breaking the statement into multiple lines, 
*-- If it could be a DOCUMENTED behaviour it would be best IMHO!
replace IN te ;
	n1 WITH n2 ;
	n2 WITH n3 ;
	n3 WITH 99 ;
	ALL

*-- just for checking
BROWSE

*-- Doc for Select-Itemlist:
* For more information about using user-defined functions, aggregate functions, 
* and rules applying to column names, see Considerations for SQL SELECT Statements. 
* [AS Column_Name] 
* Specifies a name for a column in the query output. 
* Column_Name can be an expression, but it cannot contain characters 
* that are not permitted, for example, spaces, in table field names

*-- compare to Doc for TableListItem:
* Table_List_Item [, ...] 
* Specifies one or more tables that contain the data the query retrieves from.
* Table_List_Item can have the following syntaxes: 
* [DatabaseName!]Table [[AS] Local_Alias] 

*-- Doc for Select-Itemlist current BEHAVIOUR would be
* [[AS] Column_Name] 
SELECT ;	
	n1 t1 ;
	,n2 t2 ;
	,n3 w3 ;
	FROM te
regards

thomas
Répondre
Fil
Voir

Click here to load this message in the networking platform