NetSuite保存的搜索(公式)中有哪些SQL函数?
答案 0 :(得分:5)
以下是截至2017年7月可在NetSuite保存的搜索中使用的SQL函数列表(显示为示例代码)。这些保存的搜索不允许所有SQL函数,因此了解可以使用的函数是有帮助的。
如果您拥有可访问SuiteAnswers的NetSuite帐户,则可以点击此链接Answer Id: 10101。
我花了一段时间才找到它,因为它没有出现在网络搜索中。我想让它很容易找到。享受!
ABS( {amount} )
ACOS( 0.35 )
ASIN( 1 )
ATAN( 0.2 )
ATAN2( 0.2, 0.3 )
BITAND( 5, 3 )
CEIL( {today}-{createddate} )
COS( 0.35 )
COSH( -3.15 )
EXP( {rate} )
FLOOR( {today}-{createddate} )
LN( 20 )
LOG( 10, 20 )
MOD( 3:56 pm-{lastmessagedate},7 )
NANVL( {itemisbn13}, '' )
POWER( {custcoldaystoship},-.196 )
REMAINDER( {transaction.totalamount}, {transaction.amountpaid} )
ROUND( ( {today}-{startdate} ), 0 )
SIGN( {quantity} )
SIN( 5.2 )
SINH( 3 )
SQRT( POWER( {taxamount}, 2 ) )
TAN( -5.2 )
TANH( 3 )
TRUNC( {amount}, 1 )
CHR( 13 )
CONCAT( {number},CONCAT( '_',{line} ) )
INITCAP( {customer.companyname} )
LOWER( {customer.companyname} )
LPAD( {line},3,'0' )
LTRIM( {companyname},'-' )
REGEXP_REPLACE( {name}, '^.*:', '' )
REGEXP_SUBSTR( {item},'[^:]+$' )
REPLACE( {serialnumber}, '&', ',' )
RPAD( {firstname},20 )
RTRIM( {paidtransaction.externalid},'-Invoice' )
SOUNDEX( {companyname} )
SUBSTR( {transaction.salesrep},1,3 )
TRANSLATE( {expensecategory}, ' ', '+' )
TRIM ( BOTH ',' FROM {custrecord_assetcost} )
UPPER( {unit} )
ASCII( {taxitem} )
INSTR( {messages.message}, 'cspdr3' )
LENGTH( {name} )
REGEXP_INSTR ( {item.unitstype}, '\d' )
TO_NUMBER( {quantity} )
ADD_MONTHS( {today},-1 )
LAST_DAY( {today} )
MONTHS_BETWEEN( SYSDATE,{createddate} )
NEXT_DAY( {today},'SATURDAY' )
ROUND( TO_DATE( '12/31/2014', 'mm/dd/yyyy' )-{datecreated} )
TO_CHAR( {date}, 'hh24' )
TO_DATE( '31.12.2011', 'DD.MM.YYYY' )
TRUNC( {today},'YYYY' )
另请参阅以下某个示例部分中的Sysdate。
COALESCE( {quantitycommitted}, 0 )
NULLIF( {price}, 0 )
NVL( {quantity},'0' )
NVL2( {location}, 1, 2 )
DECODE( {systemnotes.name}, {assigned},'T','F' )
TO_DATE( SYSDATE, 'DD.MM.YYYY' )
或
TO_CHAR( SYSDATE, 'mm/dd/yyyy' )
另请参阅日期时间函数中的TO_DATE和TO_CHAR。
CASE {state}
WHEN 'NY' THEN 'New York'
WHEN 'CA' THEN 'California'
ELSE {state}
END
或
CASE
WHEN {quantityavailable} > 19 THEN 'In Stock'
WHEN {quantityavailable} > 1 THEN 'Limited Availability'
WHEN {quantityavailable} = 1 THEN 'The Last Piece'
WHEN {quantityavailable} IS NULL THEN 'Discontinued'
ELSE 'Out of Stock'
END
DENSE_RANK ( {amount} WITHIN GROUP ( ORDER BY {AMOUNT} ) )
或
DENSE_RANK( ) OVER ( PARTITION BY {name}ORDER BY {trandate} DESC )
KEEP( DENSE_RANK LAST ORDER BY {internalid} )
RANK( ) OVER ( PARTITION by {tranid} ORDER BY {line} DESC )
或
RANK ( {amount} WITHIN GROUP ( ORDER BY {amount} ) )