LCAST
  • 1 Minute to read
  • Dark
    Light
  • PDF

LCAST

  • Dark
    Light
  • PDF

Article summary

General: []

Extract numeric data contained in a string or integer and store as a longinteger

Purpose

Use this function to:
  • Cast data from integer to longinteger (to support creation of joins)
  • Cast data loaded as string to longinteger  
  • Filter records containing non-numeric data

Return Value

PropertyValue
FieldTypeLong(Integer)
FieldSizeLow / Med / High / Continuous
DataTypeDiscrete / Continuous
DataSizeShort / Integer / LongInteger / Double
Example Return Value: 321536



Parameters

ParameterJSONDescription
Table“targetTable”: “MyTableName”The target table on which the new field will be created
Filter“dataset”: {DataSet_JSON}Optional.   If a filter is applied, records not in the filter recordset will be returned as null.
Function
"function":""
String
String Function“p1”: “”LCAST(A)
A“p2”:
Required. 
Supports:  
  • DataType: Discrete/Continuous
  • Field Type: String, Integer
  • Fixed Value: #NNaANNuu, #NNN
Treat Null as Zero"nullIsZero": true
"nullIsZero": false

True/False.
Default = False
If true, then any null values in the input fields will be treated as if they have a value of 0.

JSON Sample

{
  "method": "BuildBakedField",
  "project": "AllDataSource_03",
  "targetTable": "customer",
  "overwrite": true,
  "name": "LCAST frequency",
  "function": "string",
  "p1": "LCAST(A)",
  "p2": "frequency"
}


Usage Notes

See Also:   

  • Engineering | Expression Field

Example

ExampleDetails
DescriptionConvert integer to longinteger
Input
  • Table: = [transactions]
  • Filter: = [No Filter]
  • Function: = String
  • String Function:= LCAST(A)
  • A:=[customer].[cid]
  • Name: = lngCID
Sample





Was this article helpful?

What's Next