Anthony Filaski · Dec 14, 2018

Converting VarBinary to VarChar


I'm looking to find if there is a datatype convert equivalent in Object Script to SQL convert function. Have a VarBinary string coming in from source application (which is really performing a SQL dump). The source application uses the standard SQL convert function to convert from varchar to varbinary on their side.

I know &sql(Convert()) should work in Object Script, but am wondering if there is a better way of doing this. 

Getting data in via flat file (Record Map), then using data transform to transpose this data to SDA3. 

Does someone have a suggestion or know of a better method of doing this data type conversion in Ensemble? Or is &SQL() the only feasible option available. 

Thank you

0 440
Discussion (4)2
Log in or sign up to continue

ObjectScript method:

WRITE $SYSTEM.SQL.CONVERT(expression,convert-to-type,convert-from-type)

is equal to SQL Convert function.