netsuite 支持的字段计算函数 oracle 函数-CarlZeng
var dd = win.makeDropdown(‘function’, 184, [‘’, ‘’, ‘ABS’, ‘ABS(n)’, ‘ACOS’, ‘ACOS(n)’, ‘ADD_MONTHS’, ‘ADD_MONTHS(date, integer)’, ‘ASCII’, ‘ASCII(char)’, ‘ASIN’, ‘ASIN(n)’, ‘ATAN’, ‘A
TAN(n)’, ‘ATAN2’, ‘ATAN2(n1 { , | / } n2)’, ‘BITAND’, ‘BITAND(expr1, expr2)’, ‘CEIL’, ‘CEIL(n)’, ‘CHR’, ‘CHR(n [ USING NCHAR_CS ])’, ‘COALESCE’, ‘COALESCE(expr [, expr ]…)’, ‘CONCAT’, ‘CONCAT(char1, char2)’, ‘COS’, ‘COS(n)’, ‘COSH’, ‘COSH(n)’, ‘DECODE’, ‘DECODE(expr, search, result [, search, result ]…[, default ])’, ‘DENSE_RANK’, ‘DENSE_RANK(expr [, expr ]…) WITHIN GROUP (ORDER BY expr [ DESC | ASC ] [ NULLS { FIRST | LAST } ] [,expr [ DESC | ASC ] [ NULLS { FIRST | LAST } ] ]… )’, ‘EXP’, ‘EXP(n)’, ‘FLOOR’, ‘FLOOR(n)’, ‘INITCAP’, ‘INITCAP(char)’, ‘INSTR’, ‘INSTR(string , substring [, position [, occurrence ]])’, ‘KEEP’, ‘KEEP(DENSE_RANK { FIRST | LAST } ORDER BY expr [ NULLS { FIRST | LAST } ])’, ‘LAST_DAY’, ‘LAST_DAY(date)’, ‘LENGTH’, ‘LENGTH(char)’, ‘LN’, ‘LN(n)’, ‘LOG’, ‘LOG(n2, n1)’, ‘LOWER’, ‘LOWER(char)’, ‘LPAD’, ‘LPAD(expr1, n [, expr2 ])’, ‘LTRIM’, ‘LTRIM(char [, set ])’, ‘MOD’, ‘MOD(n2, n1)’, ‘MONTHS_BETWEEN’, ‘MONTHS_BETWEEN(date1, date2)’, ‘NANVL’, ‘NANVL(n2, n1)’, ‘NEXT_DAY’, ‘NEXT_DAY(date, char)’, ‘NULLIF’, ‘NULLIF(expr1, expr2)’, ‘NVL’, ‘NVL(expr1, expr2)’, ‘NVL2’, ‘NVL2(expr1, expr2, expr3)’, ‘POWER’, ‘POWER(n2, n1)’, ‘RANK’, ‘RANK(expr [, expr ]…) WITHIN GROUP (ORDER BY expr [ DESC | ASC ] [ NULLS { FIRST | LAST } ] [,expr [ DESC | ASC ] [ NULLS { FIRST | LAST } ] ]… )’, ‘REGEXP_INSTR’, ‘REGEXP_INSTR(source_char, pattern [, position [, occurrence [, return_option [, match_parameter ]]]])’, ‘REGEXP_REPLACE’, ‘REGEXP_REPLACE(source_char, pattern [, replace_string [, position [, occurrence [, match_parameter ]]]])’, ‘REGEXP_SUBSTR’, ‘REGEXP_SUBSTR(source_char, pattern [, position [, occurrence [, match_parameter ]]])’, ‘REMAINDER’, ‘REMAINDER(n2, n1)’, ‘REPLACE’, ‘REPLACE(char, search_string [, replacement_string ])’, ‘ROUND (DATE)’, ‘ROUND(date [, fmt ])’, ‘ROUND (number)’, ‘ROUND(n [, integer ])’, ‘RPAD’, ‘RPAD(expr1 , n [, expr2 ])’, ‘RTRIM’, ‘RTRIM(char [, set ])’, ‘SIGN’, ‘SIGN(n)’, ‘SIN’, ‘SIN(n)’, ‘SINH’, ‘SINH(n)’, ‘SOUNDEX’, ‘SOUNDEX(char)’, ‘SQRT’, ‘SQRT(n)’, ‘SUBSTR’, ‘SUBSTR(char, position [, substring_length ])’, ‘TAN’, ‘TAN(n)’, ‘TANH’, ‘TANH(n)’, ‘TO_CHAR()’, ‘TO_CHAR({ datetime | interval } [, fmt [, \‘nlsparam\‘ ] ])’, ‘TRANSLATE’, ‘TRANSLATE(expr, from_string, to_string)’, ‘TREAT’, ‘TREAT(expr AS [ REF ] [ schema. ]type)’, ‘TRIM’, ‘TRIM([ { { LEADING | TRAILING | BOTH }[ trim_character ] | trim_character} FROM ]trim_source)’, ‘TRUNC (number)’, ‘TRUNC(n1 [, n2 ])’, ‘TRUNK (DATE)’, ‘TRUNC(date [, fmt ])’, ‘UPPER’, ‘UPPER(char)’], 0, ‘’, ‘’, “setWindowChanged(window, true);setValueToFormula(this,formula);”, null, 200,document,-2147483648);
至于这些函数这里可以他们的详细参数介绍 我们可以上网搜索一下:oracle函数chm
如20090227我搜索的推荐一个http://www.softii.com/downinfo/18345.html 下载后里面有一个一个rar(OraclegfudCHMhjSQLcksc.rar)中有一个chm(Ora9iSQLRef.chm)
这个chm中就可以查询 所以上面的函数的用法以及说明等信息。
这里介绍一个decode,用法类似mssql 中的case,when;
DECODE
Syntax
decode::=
DECODE(expr,search,result[,search,result]…[,default])
This example decodes the value warehouse_id
. If warehouse_id
is 1, then the function returns ‘Southlake
‘; if warehouse_id
is 2, then it returns ‘San Francisco
‘; and so forth. If warehouse_id
is not 1, 2, 3, or 4, then the function returns ‘Non-domestic
‘.
SELECT product_id,
DECODE (warehouse_id, 1, ‘Southlake’,
2, ‘San Francisco’,
3, ‘New Jersey’,
4, ‘Seattle’,
‘Non-domestic’)
“Location of inventory” FROM inventories
WHERE product_id < 1775;
希望能帮助到您! 如果chm下不到也可以联系我。