10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

System-defined FunctionsResult Data TypeIf the arguments are of the same data type, then the result is of that datatype. If the two arguments are of different data types, then they must be ofcomparable data types. When the arguments are of different but comparabledata types, then OpenROAD uses the following rules to determine the datatype of the result:• The result type is always the higher of the two data types; the order ofprecedence of the data types is as follows:date > money > float4 > float > integer > smallint > integer1andc > text > char > varchar• The result length is taken from the longest value, for example:ifnull (varchar (5), c10)results in c10.The result is nullable if either argument is nullable. The first argument is notrequired to be nullable, though in most applications it would be nullable.Dbmsinfo FunctionIn OpenROAD, if you use the dbmsinfo function as a statement by itself, theonly valid request_name is _bintim:variable = dbmsinfo('_bintim')All other values of request_name return blanks unless the function is part of alarger SQL statement. For example, the following statement returns a username:select logname = dbmsinfo('username')However, the following statement returns blanks:logname = dbmsinfo('username')64 <strong>Programming</strong> <strong>Guide</strong>

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

Saved successfully!

Ooh no, something went wrong!