28.01.2013 Views

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

SAP HANA Developer Guide - Get a Free Blog

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.

Function Syntax Purpose Example<br />

date date(int, int, int, int, int)<br />

date date(int, int, int, int, int,<br />

int)<br />

longdate longdate longdate(stringarg)<br />

longdate longdate(fixedarg)<br />

longdate longdate(int, int, int)<br />

longdate longdate(int, int, int,<br />

int, int)<br />

longdate longdate(int, int, int,<br />

int, int, int)<br />

longdate longdate(int, int, int,<br />

int, int, int, int)<br />

time time time(stringarg)<br />

String Functions<br />

time time(fixedarg)<br />

time time(int, int)<br />

time time(int, int, int)<br />

behind the comma and tries<br />

to make a date from the rest.<br />

The other versions accept the<br />

individual components to be<br />

set.<br />

convert arg to longdate type,<br />

similar to date function<br />

above.<br />

convert arg to time type,<br />

similar to date function above<br />

Function Syntax Purpose<br />

longdate(fixed(2000020313<br />

5026.1234567, 10, 5)) -><br />

longdate('2000-02-03<br />

13:50:26.1234500')<br />

longdate(2011, 3, 16, 9, 48,<br />

12, 1234567) -><br />

longdate('2011-03-16<br />

09:48:12.1234567')<br />

strlen int strlen(string) returns the length of a string in bytes, as<br />

an integer number.<br />

midstr string midstr(string, int, int) returns a part of the string starting at<br />

arg2, arg3 bytes long.<br />

arg2 is counted from 1 (not 0)<br />

leftstr string leftstr(string, int) returns arg2 bytes from the left of the<br />

arg1. If arg1 is shorter<br />

than the value of arg2, the complete<br />

string will be returned.<br />

rightstr string rightstr(string, int) returns arg2 bytes from the right of the<br />

arg1. If arg1 is shorter<br />

than the value of arg2, the complete<br />

string will be returned.<br />

instr int instr(string, string) returns the position of the first<br />

occurrence of the second string<br />

148<br />

P U B L I C<br />

© 2012 <strong>SAP</strong> AG. All rights reserved.<br />

within the first string (>= 1) or 0, if the<br />

second string is not<br />

contained in the first.<br />

<strong>SAP</strong> <strong>HANA</strong> <strong>Developer</strong> <strong>Guide</strong><br />

Setting Up the Analytic Model

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

Saved successfully!

Ooh no, something went wrong!