The Resource Import SQL Scripts enables you to define SQL scripts to import resources into DMS. This import can be used to add new resources to DMS and to change existing resources. Before you add the SQL scripts, one or more connection strings must be defined. Any number of SQL import scripts can be defined. For help writing SQL scripts in DMS please see Hints and Tips Writing SQL Scripts in the help documentation. For details on the SQL columns required for the import, please see SQL Resource Import Columns Required.
To define Resource Import SQL scripts, select Interface | Import Settings | Resource Import SQL Scripts. A window will appear with the current list of defined resource import scripts. The example below shows there are not any defined SQL Scripts:
The following tabs and commands are:
File
There are four tabs that can be defined for the import and they are:
The tab requires three entries:
Click Save to save the new script. Click Cancel to cancel the addition of the new script.
In order to help you build the SQL script DMS provides a button that adds the necessary information for you to add your custom information to. Click on the Build SQL button, DMS will ask you to verify that you want to add the required SQL fields to the script. If you select yes, DMS adds the SQL script as in the example below:
To the above script you would add the parameters required to complete the SQL. For example, for each value after the “as” enter the name of the column or calculated field from the source database. You also need to add the table(s) to the “From” statement, any joins, and any required information to the “where” clause. Note that the yellow line after the lines numbers indicates lines that have been edited. Once the save button has been selected, the yellow line will disappear.
Once a script has been entered, you can test the script by using the button. This button will run the script and access the external database.
The resource profile SQL tab is used to define the resources profile (working hours) to DMS. The tab has one entry and that is for the resource profile’s SQL fields. The screen below is an example of the Resource Profile SQL tab after the button has been pressed and the SQL has been created:
The Pools SQL tab is used to define what Pools you want to add to DMS. To remove a pool from being used in DMS, set the Available flag to false. The screen example below shows the Pools SQL tab after the button has been pressed:
The Resource Pools SQL tab is used to specify a resource/pool relationship. Both the resource and the pool must already exist in DMS.
The screen example below shows the Resource Pools SQL tab after the button has been pressed:
If DeletePool is true, the corresponding resource/pool relationship is deleted if it exists. If adding a new resource/pool relationship, DeletePool should be set to false.