Datatype Conversion

Is it possible to convert text datatype to numeric datatype ?

Hi Ramakrishna,
Thank you for your query. May I know the database where you want to apply datatype conversion ?

Regards,
Helical Insight Team

I am using MySQL database

Hi Ramakrishna,
Thank you for sharing the details. In case of MySQL database, you can convert text to numeric datatype using CAST function. Using custom column you can achieve it.

Following are the steps to apply CAST function:

  1. Go to Adhoc mode
  2. Create a custom column.
  3. Enter Custom Column Name
  4. Insert the code
    CAST( text_type_col_name as UNSIGNED)

//code used for converting text column to integer value

  1. Click OK to confirm and then click “Generate Report” to view output.

Similarly, using same function you can convert to other datatype as well.

Regards,
Helical Insight Team