how to use the cast () function using Sql Builder

153 views Asked by At

I have a query like this, which needs a cast :

FROM   w.a_w WTable
       INNER JOIN w.u WuTable
              ON (WTable.CD = CAST(WuTable.CD AS INTEGER))

But i am not getting how to make this query using SQL Builder as I don't get any Cast() or AS Integer build in functions there.

Can someone please guide me through this.

1

There are 1 answers

0
syokensyo On

Not sure which language you are using, but for golang, I'm using https://github.com/huandu/go-sqlbuilder this lib to build sql, it has a Raw() function, which you can put into your raw func expr, it will not be added to the args, and I think there may be the same capability in the sql builder lib you are using.