Translations:Documentation/HowTo/MigrateFromHSQLDB/40/fr

From The Document Foundation Wiki
Jump to: navigation, search
Numeric
HSQLDB HSQLDB and Firebird Firebird
BITAND(a,b) BIN_AND(a,b)
BITOR(a,b) BIN_OR(a,b)
BITXOR(a,b) BIN_XOR(a,b)
DEGREES(d) <value for radians>*360/(2*PI())
LOG(d) LN(d)
RADIANS(d) <value for degrees>*2*PI()/360
ROUNDMAGIC(d) No Function
TRUNCATE(a,b) TRUNC(a,b)
TEXT
HSQLDB HSQLDB and Firebird Firebird
ASCII(s) ASCII_VAL(s)
BIT_LENGTH(s) Returns length of text. HSQLDB: 16bit per character Firebird: 8bit, special character 16bit. Same Name, different counting! BIT_LENGTH(s)
CHAR(c) ASCII_CHAR(c)
CONCAT(str1,str2)

'str1'+'str2'+'str3'

'str1'‖'str2'‖'str3'
DIFFERENCE(s1,s2) No Function
HEXTORAW(s) No Function
INSERT(s1,start,len,s2) OVERLAY(s1 PLACING s2 FROM start [FOR len])

Not working in query-GUI

LCASE(s) LOWER(s)
LENGTH(s) CHAR_LENGTH(s)

CHARACTER_LENGTH()

LOCATE(search,s[,start]) POSITION(search IN s) POSITION(search,s[,start])
LTRIM(s) TRIM(LEADING FROM s)
OCTET_LENGTH(s) Same Name, different counting!
RAWTOHEX(s) No Function
REPEAT(s,count) No Function
RTRIM(s) TRIM(TRAILING FROM s)
SOUNDEX(s) No Function
SPACE(count) No Function
SUBSTR(s,start[,len])

SUBSTRING(s,start[,len])

SUBSTRING(s FROM start [ FOR len])
UCASE(s) UPPER(s)
DATE/TIME
HSQLDB HSQLDB and Firebird Firebird
CURDATE() CURRENT_DATE
CURTIME() CURRENT_TIME
DATEDIFF(string, datetime1, datetime2)'ms'='millisecond', 'ss'='second', 'mi'='minute', 'hh'='hour', 'dd'='day', 'mm'='month', 'yy' = 'year' DATEDIFF(string, datetime1, datetime2) millisecond, second, minute, hour, day, week, month, year

Only long version without

DAY(date)DAYOFMONTH(date) EXTRACT(DAY FROM datetime)
DAYNAME(date) No Function
DAYOFWEEK(date) EXTRACT(WEEKDAY FROM datetime)

Not working in query-GUI

DAYOFYEAR(date) EXTRACT(YEARDAY FROM datetime)

Not working in query-GUI

HOUR(time) EXTRACT(HOUR FROM datetime)
MINUTE(time) EXTRACT(MINUTE FROM datetime)
MONTH(date) EXTRACT(MONTH FROM datetime)
MONTHNAME(date) No Function
NOW() CURRENT_TIMESTAMP
QUARTER(date) CEILING(EXTRACT(MONTH FROM date)/3.00)
SECOND(time) EXTRACT(SECOND FROM datetime)
WEEK(date) EXTRACT(WEEK FROM datetime)

Not working in query-GUI

YEAR(date) EXTRACT(YEAR FROM datetime)
TO_CHAR(datetime, string) No Function
Databaseconnection
HSQLDB HSQLDB and Firebird Firebird
DATABASE() RDB$GET_CONTEXT('SYSTEM', 'DB_NAME')

Not working in query-GUI

USER()

Not working in query-GUI

CURRENT_USER
IDENTITY() No Function
System
HSQLDB HSQLDB and Firebird Firebird
IFNULL(exp,value) COALESCE(expr1,expr2,expr3,...)
CASEWHEN(exp,v1,v2) CASE WHEN expr1 THEN v1[WHEN expr2 THEN v2] [ELSE v4] END IIF(exp,v1,v2)(only if CASE WHEN is to complicated)
CONVERT(term,type) CAST(term AS type)