2016-04-18 10 views

答えて

3

使用CHARINDEXおかげで、SUBSTRING

public static server str compColB() 
{ 
    str result; 

    result = strFmt("SUBSTRING(%1, 0, CHARINDEX(N'^', %1)" 
     , SysComputedColumn::returnField(tableNum(SourceTable), 'viewDataSoure', fieldStr(ViewName, ColumnA)) 
    ); 


    return result; 
} 


public static server str compColC() 
{ 
    str result; 

    result = strFmt("SUBSTRING(%1, CHARINDEX(N'^', %1) + 1, 9999" 
     , SysComputedColumn::returnField(tableNum(SourceTable), 'viewDataSoure', fieldStr(ViewName, ColumnA)) 
    ); 


    return result; 
} 
関連する問題