|
| Topics this page:
|
|
The absolute value is used to determine whether a number is odd or even. In Transac-SQL:
CASE WHEN ABS(x) % 2 = 1
ELSE 'even' In VBScript:
stat = "even" SELECT CASE abs(x) mod 2
Response.write x & " is " & stat In JScript:
var stat = "even"; switch(Math.abs(x) % 2) {
Response.Write(x.toString() + " is " + stat);
|
Angles within these trig functions are specified in radians as rather than in degrees.
|
| Library | Function | Return Type | Parameters | Description |
|---|---|---|---|---|
| acos | double | double angle | Returns the arc cosine of an angle, in the range of 0.0 through pi | |
| asin | double | double angle | Returns the arc sine of an angle, in the range of -pi/2 through pi/2 | |
| atan2 | double | double x, double y | Returns the arc tangent of an angle, in the range of -pi/2 through pi/2 | |
| atan | double | double angle | Converts rectangular coordinates (b, a) to polar (r, theta) | |
| Math. | cos | double | double angle | Returns the trigonometric cosine of an angle in radians. |
| Math. | sin | double | double angle | The sine of the angle specified in radians. |
| Math. | tan | double | double angle | The tangent of the angle specified in radians. |
|
| Library | Function | Return Type | Parameters | Description of return value |
|---|---|---|---|---|
| length | number | number | In Oracle: Returns the number of characters in the column. | |
| initcap | text | -- | In Oracle: Initial caplitalize (the first letter of each word in) variables. | |
| lpad | text | -- | In Oracle: Pre-pends additional filler characters on the left of data in a column. | |
| rpad | text | -- |
In Oracle: Appends additional filler characters on the right of data in a column.
Typically used in formatting fixed-space reports:
dbms_output.put_line( rpad('TABLESPACE',60,' ') )
|| rpad('TOTAL(M)',10,' ') || rpad('FREE(M)',10,' '));
| |
|
ltrim rtrim | text | -- | In Oracle: Removes blanks from the left or right of a column. | |
| substr | text | 1.column 2.starting position 3.number of positions | In Oracle: Removes blanks from the left or right of a column. | |
| trunc(sysdate) | text | -- | In Oracle: Truncates (removes) the time portion of what is returned from the sysdate system variable. | |
| to_char | text | -- | In Oracle: Converts to data type values in other data types (such as date and numeric). |
Lowe Lum Carlson Systems' Oracle SQL 8i Tutorials Lesson #11 - Character Functions
|
Related Topics:
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page Thank you! | |||