Set Fields, Set("Fields"), FldList()
SET FIELDS lets you limit some commands to dealing with only a subset of the fields in a table or even a group of fields drawn from several tables. The two functions give you information about the current settings. SET FIELDS affects those commands that let you specify a field list with the FIELDS clause, as well as INSERT INTO in its FROM MEMVAR and FROM ARRAY forms.Although the things you can do with SET FIELDS are pretty cool, we've never used it much and don't expect to now. Pretty much everything you can do with SET FIELDS, you can also do with views (the SQL kind, not the CREATE VIEW kind).
Usage |
SET FIELDS ON | OFF SET FIELDS LOCAL | GLOBAL SET FIELDS TO [ FieldList | ALL [ LIKE | EXCEPT Skeleton ] ] |
Usage |
cOnOrOff = SET("FIELDS") cListOfFields = SET("FIELDS", 1) cLocalOrGlobal = SET("FIELDS", 2) cListOfFields = FLDLIST() cFieldName = FLDLIST( nWhichField ) |
Example |
USE Customer SET FIELDS TO Company_Name, Customer_Id BROW && Notice that only name and id show up ? SET("FIELDS") && Returns "ON" ? SET("FIELDS", 1) && Returns "COMPANY_NAME,CUSTOMER_ID" ? FLDLIST() && Returns "CUSTOMER.COMPANY_NAME,CUSTOMER.CUSTOMER_ID" ? SET("FIELDS", 2) && Returns "LOCAL" |
See Also |
AFields(), Append From, Blank, Browse, Copy Structure, Copy To, Display, Export, Gather, Insert-SQL, List, Replace From Array, Scatter, Sort |