Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
yadav_anil782
Creator II
Creator II

alias name require

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
3 Replies
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
pavendhan
Partner - Contributor III
Partner - Contributor III

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

];