cancel
Showing results for 
Search instead for 
Did you mean: 

CDS shorten a database entry

truckla
Explorer
0 Kudos

Hi,

Is it possible to shorten all entries of a column in a database table ?
e.g. from 10 characters to 5 ? And this in a CDS-View?

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor
0 Kudos

To shorten the value of a column in a CDS View projection you can use e.g. the SUBSTRING, LEFT, RIGHT, ... function, depending on your needs.

If you want to persist the changes you cannot do it with a CDS View. You have to use an ALTER statement to shorten the length of the column (if you want to do that, consider what information you will lose aka what does not fit into the shortend length).

Answers (0)