You can translate the question and the replies:

Alter on Base View - Add Trim

I would like to add Trim() function to the column in the base view to remove the default spaces for CHAR data type. Can I do this by running an alter statement? I need to do this across all the coulumn in the Source, Is there any setting to do trim by default for all source columns.
user
09-08-2017 13:47:40 -0400
code

2 Answers

Hi, In order to remove the default spaces for CHAR or TEXT data type fields, I would check the option “Ignore trailing spaces” under the “Read & Write” tab of the ODBC or JDBC data source. If this option is selected, Virtual DataPort will remove the unneeded space characters at the end of the CHAR/TEXT type values of the results obtained by the data source’s views. Using this option you don’t need to apply the trim function. You can refer to subsection [“Read & Write” tab](https://community.denodo.com/docs/html/browse/6.0/vdp/administration/creating_views/importing_data_sources_and_creating_base_views/jdbc_sources#importing-jdbc-sources) under the section ‘**Importing JDBC Sources**' of the Virtual DataPort Administration Guide to know more information. Hope this helps!!
Denodo Team
10-08-2017 07:02:31 -0400
code
Thank you for the response. I would also like to know, if this can be done to a specific view using alter statment.
user
 Edited on: 03-01-2022 10:08:17 -0500
You must sign in to add an answer. If you do not have an account, you can register here