I'm trying to retrieving data from a database. Some of my data tables are
constructed with a column for date+time (datetime format) and a number of columns with data values. Are there any way to import data to vensim from this sort of table and using the date-time column as time in Vensim?
Database import
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
writing to database
I have some problems with the syntax for saving data to a database. T
I have the variables inflow_a, inflow_b, inflow_c in the model.
The values should be saved to a table hbv with the filelds day, in_a, in_b, in_c.
What would the syntax look like??
I have the variables inflow_a, inflow_b, inflow_c in the model.
The values should be saved to a table hbv with the filelds day, in_a, in_b, in_c.
What would the syntax look like??
-
- Senior Member
- Posts: 1107
- Joined: Wed Mar 12, 2003 2:46 pm
Look at the example for output using Insert and Delete in Chapter 14 of the DSS reference supplement. If you have inflow_a then you would use
:VAR inflow_a
to specify this. If inflow_a, inflow_b and inflow_c are all fields in a record with a single time field then I think you will need to output to 3 temporary tables and do a join. I will have to take another look at this to see if there is an easier way.
:VAR inflow_a
to specify this. If inflow_a, inflow_b and inflow_c are all fields in a record with a single time field then I think you will need to output to 3 temporary tables and do a join. I will have to take another look at this to see if there is an easier way.