Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Easy Question (I Think)
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00536048
Message ID:
00536088
Views:
10
Hi Kirk,
Here are two ways:
1.
CREATE VIEW myView AS SELECT 
 fld1, fld2, ..., 
 <b>IIF(aType = 'C', 'Created', IIF(aType = 'U', 'Updated', 'Deleted')) as action</b>
 FROM mainTable
Obs. This will return Deleted for all records having aType not 'C' or 'U'
2.
Create actTable table with two fields:
aCode char 1 values 'C', 'D', 'U'
aType char 7 values 'Created', ...
and then
CREATE VIEW myView AS SELECT 
 A.fld1, A.fld2,..., B.aType
 FROM mainTable A JOIN actTable B
  ON a.aCode = b.aCode
Doru
Previous
Reply
Map
View

Click here to load this message in the networking platform