Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
i have the following table.
BranchCal:
LOAD BRCODE,
DECDDT,
Date(DECDDT, 'DD/MM/YYYY') as DATE,
Month(DECDDT) as MONTH,
MonthName(DECDDT) as MonthYear,
Year(DECDDT) as YEAR,
DAYS,
AutoNumber(BRCODE&'-'&DECDDT) as Key
FROM
QVD\BranchCal.qvd
(qvd);
in the above script i need to do Autonumber for MonthYear field also.
How can i do this.
pls helpppp....
What do you hope to achieve by doing Autonumber for MonthYear field ?
It will already be stored a number and not have many distinct values.
just want to do reference table to avoid synthetic key.
plssssss helppp
Not sure what advantages this will offer you, but to autonumber multiple sequences, you can use the optional series name parameter:
AutoNumber(MonthName(DECDDT), 'MonthYear') As MYKey,
AutoNumber(BRCODE&'-'&DECDDT, 'BrCode') as Key
If you mean composite containing all 3 fields:
AutoNumber(MonthName(DECDDT) & BRCODE & '- '& DECDDT) as Key
But adding MonthName to the key will only make the key larger without adding precision as MonthName is a lower cardinality dependent on DECDDT already in the key.
i did like this...
BranchCal:
LOAD BRCODE,
DECDDT,
Date(DECDDT, 'DD/MM/YYYY') as DATE,
Month(DECDDT) as MONTH,
MonthName(DECDDT) as MonthYear,
Year(DECDDT) as YEAR,
DAYS,
AutoNumber(MonthName(DECDDT)&'-'&DECDDT) as Key
FROM
QVD\BranchCal.qvd
(qvd);
and in reference table like this
LOAD Distinct
MonthYear,
BRCODE,
DECDDT,
Key
Resident BranchCal;
DROP Field BRCODE from BranchCal;
DROP Field DECDDT from BranchCal;
DROP Field MonthYear from BranchCal;
is this correct.???
but i m not getting any values on MonthYear???
pls help
any suggestions plsssss
pls give some suggestions
what are you trying to achieve? I don't understand what you are modelling. Can you upload an example of the qvw?