GAMS [ Home | Support | Sales | Solvers | Documentation | Model Libraries | Search | Contact Us ]

SalesProfitDB1 : Single-valued tables


Example of database access with MDB2GMS
The programs selects sales and profit information from database "sample.mdb"
and writes them to "sales.inc" or "profit.inc" respectively.

   Files:  Sample.mdb  SalesProfitDB1.gms
$ontext Example of database access with MDB2GMS The programs selects sales and profit information from database "sample.mdb" and writes them to "sales.inc" or "profit.inc" respectively. $offtext set y years /1997*1998/; set loc locations /nyc,was,la,sfo/; set prd products /hardware, software/; parameter sales(prd,loc,y) / $call =mdb2gms I=Sample.mdb Q="select prod,loc,year,sales from data" O=sales.inc $include sales.inc /; display sales; parameter profit(prd,loc,y) / $call =mdb2gms I=Sample.mdb Q="select prod,loc,year,profit from data" O=profit.inc $include profit.inc /; display profit;