Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
qualify *;
RP:
LOAD
Field1,
Field2,
Field3,
FROM [lib://20153098/Book11111.xlsx]
(ooxml, embedded labels,table is Sheet1);
Unqualify *;
So, by loading this I will get my output as -------- RP.Field1,RP.Field2,RP.Field3 .
The output is with tablename.Fieldname. The default delimiter is .(dot) between them.
My requirment is I want to qualify all the fields but the delimiter I want is '_' (underscore).
So,Is it possible to convert one delimiter to other and qualify fields ?
Many Thanks,
Reddy.
We can use a little script to whip through the data model and rename all of our fields to something friendlier for example tablename_fieldname
The only caveat is that it won’t rename a field to an existing field name (linked fields) so this still needs to be done manually, but if everything is qualified then you don’t have any links in the first place!
For vTable = 0 to NoOfTables() -1
Let vTableName = TableName(vTable);
For f = 1 to NoOfFields('$(vTableName)')
let vFieldOld = FieldName($(f),'$(vTableName)');
let vFieldNew = Replace('$(vFieldOld)','$(vTableName)'&'.','_');
RENAME FIELD $(vFieldOld) to $(vFieldNew);
Next f;
Next ;
-Siva
U need this?
RP_Field1,RP_Field2,RP_Field3 .
Hi Shivesh,
ya ,that is what I need excatly.
regards,
reddy.
if fields are less then rather than using qualify statement use filed aliasing.
ex field1 as RP_field1.
PLease look at the post
Hi Prashanthi,
Did you try the scrip i posted? Or share sample data, i will help.
-Siva