我有一個包含數字和字母像這樣的SQL Server數據庫的字段:分割字符串與水晶數字和字母報告
名稱surname1 surname2 3333 1T NP
領域是NCHAR數據類型
我需要在字段中提取名稱surname1和surname2,並在報告的其他字段中提取3333。
我用這個代碼
Whileprintingrecords;
stringvar array Names := split({Table.Field}," ");
If ubound(Names) >=3 then
Names [1] + " " +Names [2] +" " + Names [3];
但只有名字和姓氏像作品「名surname1 surname2」
的問題是,這個名字可以是「何塞·路易斯·」和姓1或surname2「德拉貝拉「
如何在查找數字時拆分字段?
謝謝!
這可能幫助https://kb.blackbaud.com/articles/Article/51212 – Hexxx
如果你的最後兩場不必須在他們的文字空間,從尾部開始計數到現場 –