Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Intellisense in [] delimited query expressions, pls
Message
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01050200
Message ID:
01053391
Views:
18
Ok, there is more.
SET SAFETY OFF
CREATE TABLE test (customer C(12) NOT NULL;
 , sales01 N(12,2) NOT NULL, sales02 N(12,2) NOT NULL )
SET SAFETY ON
ldSoldDate={^2005-02-01}
lcSales="sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")
*insert dynamic sales figures in corresponding months
INSERT INTO test (customer,&lcSales);
 VALUES ("customer1",3.1)
INSERT INTO test (customer,(lcSales));
 VALUES ("customer1",3.1)
INSERT INTO test (customer;
 ,("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")));
 VALUES ("customer1",3.1)
*INSERT INTO test (customer;
 ,EVALUATE("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##")));
 VALUES ("customer1",3.1)

*EVAL() is not exchangeable - prints the VALUE 3.1
?EVALUATE("sales"+TRANSFORM(MONTH(ldSoldDate),"@L ##"))

*can EXEC whole expr - that´s why it´s called MACRO and is slower
macro=[SELECT * from test INTO ARRAY aA]
*¯o - UT doesn´t seem to like ampersands (in preformatted text)
¯o
?aA(1,1),aA(1,2),aA(1,3)
Regards
G
Previous
Reply
Map
View

Click here to load this message in the networking platform