無奈 asked in 電腦與網際網路軟體 · 1 decade ago

請協助翻譯英翻中 (Oracle & Discoverer)

請大大們幫忙 解釋一下decode的定義 謝謝^^

Decoded Expression

An expression using the special DECODE syntax:

SYNTAX:

DECODE( expr, search, result [, search, result] ... [, default] )

To evaluate this expression, Oracle compares expr to each search

value one by one. If expr is equal to a search, Oracle returns the

corresponding result. If no match is found, Oracle returns default,

or, if default is omitted, returns null. If expr and search contain

character data, Oracle compares them using non-padded comparison

semantics.

The search, result, and default values can be expressions.

Oracle evaluates each search value only before comparing it to expr,

rather than evaluating all search values before comparing any of

them with expr. Consequently, Oracle never evaluates a search if a

previous search is equal to expr.

Oracle automatically converts expr and each search value to the

datatype of the first search value before comparing. Oracle

automatically converts the return value to the same datatype as the

first result. If the first result has the datatype CHAR or if the

first result is null, then Oracle converts the return value to the

datatype VARCHAR2.

In a DECODE expression, Oracle considers two nulls to be equivalent.

If expr is null, Oracle returns the result of the first search that

is also null.

The maximum number of components in the DECODE expression, including

expr, searches, results, and default is 255.

EXAMPLE:

This expression decodes the value DEPTNO. If DEPTNO is 10, the

expression evaluates to 'ACCOUNTING'; if DEPTNO is 20, it evaluates

to 'RESEARCH'; etc. If DEPTNO is not 10, 20, 30, or 40, the

expression returns 'NONE'.

DECODE (deptno, 10, 'ACCOUNTING',

20, 'RESEARCH',

30, 'SALES',

40, 'OPERATION',

'NONE')

Update:

再請問decode

這個字 中文意思是?^^

2 Answers

Rating
  • 1 decade ago
    Favorite Answer

    decode 用法就跟 if....else 用法差不多,

    以你的例子來講...

    就是

    ACCOUNTING代替部門代號10

    RESEARCH代替部門代號20

    SALES代替部門代號30

    OPERATION代替部門代號40

    如果部門代號不等於10,20,30或40則顯示 "NONE"

    2009-04-28 09:30:49 補充:

    decode .... "解碼" 的意思吧

  • 1 decade ago

    我每次幫人翻譯的下場就是這樣!

    很抱歉!

    問題已經被管理者強制移除,請回首頁重新連結。

    問題標題: 商用英文履歷英翻中

    移除原因: 聊天猜謎或其他非知識交流的行為

    您的問題內張貼大量內容尋求翻譯,Yahoo!奇摩予以強制移除,若情節嚴重將給予扣點或停權處分。日後請避免類似的發言,謝謝您的合作。請參考:http://tw.help.yahoo.com/know/question/question-19...

Still have questions? Get your answers by asking now.