Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
xxm3m_receipts_data_vw:
LOAD ORACLE_CASH_RECEIPT_ID,
PROPERTY_NAME,
TOWER_ID,
CREATION_DATE
FROM
(qvd);
i have column "PROPERTY_NAME" in "ORACLE_CASH_RECEIPT_ID" table . there are MANY PROPERTY NAME GIVEN in PROPERTY_NAME. I NEED TO GIVE ALIAS NAME FOR ALL PROPERTY NAME AS PROJECT . PLZ HELP IF ANY ONE CAN DO-
PROPERTY_NAME
M3M COSMOPOLITAN
M3M ESCALA
M3M GOLF ESTATE-Panorama Suites
NEE TO BE GIVE ALIAS NAME IN SCRIPT IS-
PROPERTY
COSMOPOLITAN |
ESCALA |
Panorama Suites |
You can create an excel or text file with the old and new names and use that to rename the names. See this blog post: How to Rename Fields
Do you mean that you want to rename fields (which is what aliasing normally means), or you want to transform the field values?
You could also use a mapping table for that purpose, with ApplyMap to convert the names, or you could convert the value using some rules, for example:
If(Left(PROPERTY_NAME, 4) = 'M3M ', Mid(PROPERTY_NAME, 5, 999),
If(SubstringCount(PROPERTY_NAME, '-') = 1, SubString(PROPERTY_NAME, '-', 2),
PROPERTY_NAME))
You may need more rules than this, but that will cover your sample data.
Try this....
Temp:
Load *,
if(PROPERTY_NAME='M3M COSMOPOLITAN',PROPERTY_NAME,'') AS COSMOPOLITAN
,if(PROPERTY_NAME='M3M ESCALA',PROPERTY_NAME,'') AS ESCALA
,if(PROPERTY_NAME='M3M GOLF ESTATE-Panorama Suites',PROPERTY_NAME,'') AS Panorama_Suites
;
LOAD * INLINE [
No,PROPERTY_NAME
1,M3M COSMOPOLITAN
2,M3M ESCALA
3,M3M GOLF ESTATE-Panorama Suites
];