09.11.2014 Views

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

Migrating a PostgreSQL Database to SQL Anywhere 12 - Sybase

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NOTE: <strong>SQL</strong> <strong>Anywhere</strong> does not support the Quote functions in <strong>Postgre<strong>SQL</strong></strong><br />

Numeric Functions<br />

The following numeric functions are identical in <strong>Postgre<strong>SQL</strong></strong> and <strong>SQL</strong> <strong>Anywhere</strong>:<br />

• ABS<br />

• FLOOR<br />

• RADIANS<br />

• CEILING<br />

• MOD<br />

• SIGN<br />

• DEGREES<br />

• PI<br />

• SQRT<br />

• EXP<br />

• POWER<br />

The following numeric functions have direct equivalences between <strong>Postgre<strong>SQL</strong></strong> and <strong>SQL</strong> <strong>Anywhere</strong>:<br />

<strong>Postgre<strong>SQL</strong></strong> function<br />

Equivalent <strong>SQL</strong> <strong>Anywhere</strong><br />

function<br />

Notes<br />

CBRT(dp) POWER(Numeric, 1/3)<br />

DIV(Y numeric, X numeric)<br />

LN(dp or numeric)<br />

LOG(numeric)<br />

LOG(X numeric, B numeric)<br />

RANDOM()<br />

ROUND(Numeric, Integer)<br />

LOG(Numeric)<br />

LOG10(Numeric)<br />

LOG(X Numeric)/LOG(B<br />

numeric)<br />

RAND<br />

ROUND(dp or numeric) ROUND(Numeric, 0)<br />

ROUND(V numeric, S int)<br />

SETSEED(dp)<br />

ROUND(Numeric, Integer)<br />

RAND(Integer)<br />

TRUNC(dp or numeric) TRUNCNUM(Numeric, 0)<br />

TRUNC(V numeric, S int)<br />

TRUNCNUM(Numeric,<br />

Integer)<br />

NOTE: WIDTH_BUCKET in <strong>Postgre<strong>SQL</strong></strong> does not have a <strong>SQL</strong> anywhere equivalent<br />

Date and Time Functions<br />

The date and time functions vary the most between the two database servers, with no identical functions. The<br />

following lists date and time functions in <strong>Postgre<strong>SQL</strong></strong> with equivalences in <strong>SQL</strong> <strong>Anywhere</strong>:<br />

<strong>Postgre<strong>SQL</strong></strong> function<br />

Equivalent <strong>SQL</strong> <strong>Anywhere</strong><br />

function<br />

Notes<br />

<strong>Migrating</strong> a <strong>Postgre<strong>SQL</strong></strong> <strong>Database</strong> <strong>to</strong> <strong>SQL</strong> <strong>Anywhere</strong> <strong>12</strong><br />

December 2011<br />

3

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!