在SSIS中如何使100轉為英文One Hundred?
轉換 SSIS
------解决方案--------------------
除非自己手写匹配表。没有自带翻译哦。
------解决方案--------------------
SSIS本身没有办法解决。
我是在数据库中自己手写匹配表,然后把SSIS页面的语言环境值以变量形式给入数据库,然后数据库返回string,在SSIS中显示。
------解决方案--------------------
使用script 控件传入数字返回字符串。
将数字翻译成英文单词。
参考一下下面链接中的回复
http://www.club-oracle.com/forums/sql-to-convert-number-to-words-t657/
你可以把下面的VBS代码写成一个函数。
public Function NumToText(dblVal As Double, CurrencyCode As String) As String
Static Ones(0 To 9) As String
Static Teens(0 To 9) As String
Static Tens(0 To 9) As String
Static Thousands(0 To 4) As String
Static bInit As Boolean
Dim i As Integer, bAllZeros As Boolean, bShowThousands As Boolean
Dim strVal As String, strBuff As String, strTemp As String
Dim nCol As Integer, nChar As Integer
Dim CurrencyUnit As String, CurrencyCents As String
'Only handles positive values
if dblVal < 0 then
exit function
end if
If bInit = False Then
'Initialize array
bInit = True
Ones(0) = "zero "
Ones(1) = "one "
Ones(2) = "two "
Ones(3) = "three "