cancel
Showing results for 
Search instead for 
Did you mean: 

Assign fixed values to a field

MarkusRichter
Explorer
0 Kudos

Hi,

in my example I am using a ´"compute" shape where I have attached an input adapter to take over some fields. However, I also want to add one more field and assign it with a fixed value. But my current approach causes an compile error. What am I doing wrong?

Here my current CCL extract:

 

/**@SIMPLEQUERY=COMPUTE*/

CREATE LOCAL STREAM StopLog AS SELECT to_string ( "completed" ) EVENT_NAME , InputStream.CASE_ID CASE_ID,InputStream.END_DATE "DATE" FROM InputStream ;

Is it in general possible to assign fixed values to fields e.g. with the built-in function "to_string(string)"? Is is possible to add further fields that are not derived from an input stream, but will be used later on for the output adapter?

Thanks and Best Regards.
Markus

Accepted Solutions (0)

Answers (1)

Answers (1)

JWootton
Advisor
Advisor
0 Kudos

You can absolutely do this. You don't need to use the to_string function; the key is single quotes.  For a numeric value, just type in the number for a constant.

CREATE

LOCAL STREAM StopLog AS SELECT

     'completed'  EVENT_NAME ,

     InputStream.CASE_ID CASE_ID,

     InputStream.END_DATE "DATE"

FROM InputStream ;

former_member217348
Participant
0 Kudos

Looking throught the ESP docs, it seems that there is a gap in that it could use better description of literals available in CCL. We will get this gap addressed.