In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Converting from a V_String to a double INDB

keithr197
7 - Meteor

Hi Everyone 

 

Im trying to convert a V_String column to a double indb.

 

Anyway I can do this other than Streaming out, Changing the data type in select and Streaming in (current process) 

 

Hope there is an easier way to this because the streaming increases the run time significantly.

 

Regards

Keith 

3 REPLIES 3
TimN
13 - Pulsar

You want to change the data type of a String field in the SQL Query?  If Oracle, you can do to_number.

 

https://www.techonthenet.com/oracle/functions/to_number.php

 

If the string has non-numeric characters, you'd need to strip them first (i.e. $ or , )

apathetichell
20 - Arcturus

this varies based upon your underlying db - usually it's a CAST function - or TRY CAST - but specific syntax varies. It also matters if you are going to do this for an existing column (where you can use a formula in-db tool) or in your query (which you can hard code in SQL).

simonaubert_bd
13 - Pulsar

Hello @Kei

You can use cast function such as https://www.w3schools.com/sql/func_mysql_cast.asp

CAST(yourfield AS double) 

in a formula in-db.

Pleas note that v_string is an alteryx type, not an sql one.

Best regards,

Simon

Labels
Top Solution Authors