Cognos Data Manager SQL Function

Cognos Data Manager SQL Function

Cognos Data Manager SQL Control Function

Function: SQL

Category: Control

Syntax: SQL( database_alias, sql_statement [, bCognosSQL] [,  bSuppressErrors] );

Applicable For: Cognos Data Manager Procedure Node, Cognos Data Manager Function

Explanation: You can use SQL function in Cognos Data Manager to execute SQL query against any database in Procedure node or User Define Functions. The output of this function is the boolean TRUE or FALSE based on query executed suscessfully or failed. As mentioned in syntax of SQL you have to provide database alias and SQL statement both are menditory to use this function. Here database alias means database connection name(How to create Cognos Data Manager Connection). So how to use SQL function. Below is the simple example:

Let's assume you have a database connection named 'EmployeeDB' and you want delete 'DELETE FROM tblEmployee WHERE EmployeeID=1' sql query. Then you have to use below command

SQL( 'EmployeeDB', 'DELETE FROM tblEmployee WHERE EmployeeID=1;' );

So what is the output of above query. If your query is executed successfully without any error message than the result is TRUE else FALSE. 

Check this link for common error message while using SQL function.

Still facing any issue leave a comment, i will reply you ASAP.

Your comments will be highly appreciated.

0 Comments
Leave A Comment

Please login to post your valuable comments.

Join the newsletter

Get the latest vLemonn news first

share