Convert an int column to a varchar in FrontBase SQL?

萝らか妹 提交于 2019-12-12 10:16:28

问题


How do I convert an int column to a varchar in FrontBase SQL? I need to concatenate a varchar and an int field, and I cannot just concatenate them because both arguments need to be a varchar.

I wanted to tag this "Frontbase" but I don't have permission due to reputation < 1500.

Server and database version is 4.2.7

The query looks like this:

select (TVERKOPEN.CPREFIX || CAST(TVERKOPEN.CNUMMER AS VARCHAR)) as PurchaseOrder
from TVERKOPEN

回答1:


Try with:

CAST(field AS VARCHAR(30))


来源:https://stackoverflow.com/questions/12258801/convert-an-int-column-to-a-varchar-in-frontbase-sql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!