Salesforce

Using Comments in a Direct SQL Task (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

Using Comments in a Direct SQL Task (Magic xpa 3.x)

Objective

Magic xpa does not attempt to analyze a direct SQL command's syntax and semantics.

This gives the programmer flexibility, but requires that the programmer plan the programming carefully.

It is possible to add comments into the Direct SQL command. These comments can include the colon character (:).

For example:

-- Changed by Developer X on May 5th 2011 12:33


A colon is used by Magic xpa as an indication of an input parameter.

If Magic xpa encounters a comment with a colon, it counts this colon as a required input parameter.

The Magic xpa Checker will alert about the discrepancy that an additional colon creates.

Solution

To avoid unpredictable alerts by the Magic xpa Checker, here are some suggestions that can help avoid these Checker errors and will achieve the same goal:

  1. Use Magic xpa remarks inside of the task.

  2. Use Magic xpa comments on a specific task.

  3. Change SQL comments that include the colon character (:) so that it uses a different character or find another way to express the meaning without the use of the colon.

  4. Instead of using Direct SQL, create a function or a store procedure (the comments are not parsed when fetching the arguments list) and call it using a Direct SQL task.

Reference
Attachment 
Attachment