
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Change data type from MySQL database
Hello all!
I am building an application for which I am loading the data directly from a MySQL database using SQL queries. Now my problem is the following: one field indicates the surface of a room and this field should be numerical. Apparently, this field's character type is varchar or string, as I cannot make any calculations with this field (I need a sum). How would I solve this? Changing the data type in the source is not an option, unfortunately.
My query is the following:
rooms:
SQL SELECT
id as room_id
sfc as surface_area
FROM table x
Thanks for your suggestions!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have a look at the Num# function in the help, this will help you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@NicholasIQ Please share the rows how it is looks like in your database and after load into Qlik.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Such adjustment could be easily added within a preceding-load like:
rooms:
load *, num(num#(surface_area, 'FormatPattern')) as MyNumber;
SQL SELECT id as room_id, sfc as surface_area FROM table x
