Guides you through the steps required to create user-defined functions in SQL Server Management Studio, and to map those
functions using the HCO for SQL Server Customize Name Mappings tool.
Create user-defined functions
- At a UNIX terminal,
navigate to
the
FunctionEmulation.sql file, located in the
$COBDIR/demo/sql/hcoss/functionemulation directory.
This file contains a script that creates some user-defined math functions needed by the example code.
- Execute the following:
> sqlcmd -S ServerName -U UserID -P Password -d HCO_Test -i functionemulation.sql
Map user-defined functions
- From a UNIX terminal or File window, navigate to and open the
functionemulation.xml file in a text editor. This file is located in the
$COBDIR/demo/sql/hcoss/functionemulation folder by default.
- Copy the contents of the
functionemulation.xml file.
- Navigate to and open the DialectMappings.hcomap file, located in the
$COBDIR/etc/hcoss folder.
- Insert the copied contents right before the end tag
</NameMappingDataSet> in the
DialectMappings.hcomap file and save.