--- title: "LCAST" slug: "lcast" updated: 2023-07-11T18:29:20Z published: 2023-07-11T18:29:20Z canonical: "docs.datajet.app/lcast" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # LCAST ## 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 | Property | Value | | --- | --- | | **FieldType** | Long(Integer) | | **FieldSize** | Low / Med / High / Continuous | | **DataType** | Discrete / Continuous | | **DataSize** | Short / Integer / LongInteger / Double | ```json Example Return Value: 321536 ``` ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **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 ```json { "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 | Example | Details | | --- | --- | | **Description** | Convert integer to longinteger | | **Input** | - Table: = [transactions] - Filter: = [No Filter] - **Function: = String** - String Function:= LCAST(A) - A:=[customer].[cid] - Name: = lngCID | | **Sample** | |