Since there is no variable to apply Rtrim to a document, does this mean I lose the ability to do say:
Select * From ...? I am aware that you cannot do rtrim(*) and that it needs applied to every field, then every field needs to be labeled.
so the following needs done for every field selected?
Rtrim(field) as field,
I am now loading entire tables to QVD's using incremental load with the * function so that I do not need to waste space by pulling every field. This however stores based on the document so I would have to pull every field for the stored table and do rtrim(field) as field, for every field to apply this correctly.
This just seems kind of ridiculous to have to do. Also, could applying trim functions affect index time?
Our ERP system stores whatever was entered into the field into the database. From within the ERP system however it disregards the trailing spaces when it determines the links between programs and uniqueness of fields. How would a load statement like that look? I am loading around 35 tables on my largest document, where most of them are stored into qvd's for other documents to reference.
You could code up a script SUB like this:
SUB RtrimTable (_table)
FOR i = 1 to NoOfFields('$(_table)')
LET vField = FieldName($(i),data);
LET vLoad = '$(vLoad) $(vComma)rtrim([$(vField)]) as $(vField)';
DROP TABLE $(_table);
RENAME TABLE $(_table)_temp TO $(_table);
And then assuming your loaded table is named "data", call the sub like this:
That will reload table data with an rtrim on every field and replace the data table.
Attached is an example.
rtrim.qvw 147.2 K