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:
- Go to Adhoc mode
- Create a custom column.
- Enter Custom Column Name
- Insert the code
CAST( text_type_col_name as UNSIGNED)
//code used for converting text column to integer value
- 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