Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to calculate the age of a product portfolio in years, months and days based on a field 'stat_date' and today's date and i am trying the following:
[MCAZAprroved]:
LOAD APPLICANT as MCAZApplicant,
If(Match(Trim(CATEFORY), 'HRA', 'HR', 'PID', 'PIM', 'P', 'PR', 'VMGD'), 'OTC',If(Match(Trim(CATEFORY), 'PP', 'PP10', 'N'), 'PRESCRIPTION', CATEFORY)) AS MCAZCategory,
FORM as [MCAZ Dosage Form & Route of Admin],
"GENERIC NAME" as [MCAZ Active Ingredient] ,
MANUFACTURER as Manufacturer,
"REGISTRATION NUMBER" as [RegistrationNumber],
Date("stat_date") as MCAZActionDate,
STRENGTH as [MCAZ Strength],
"TRADE NAME" as MCAZTradeName,
"Manufacturer Status";
SQL SELECT APPLICANT,
CATEFORY,
FORM,
"GENERIC NAME",
MANUFACTURER,
"REGISTRATION NUMBER",
"stat_date",
STRENGTH,
"TRADE NAME",
"Manufacturer Status"
FROM PharmaMarketAudit.dbo.tblMCAZRegister;
PortfolioAge:
load
// Original Code by Haider Al-Seaidy. Thanks!
IF (Today() <= AddYears([stat_date],1),'0 Years ',
Age(Today(),[stat_date]) & ' Years ')
&
IF(MONTH(Today()) = MONTH([stat_date]),'0 Months ',
IF(DAY([stat_date]) < DAY(Today()), fabs(MONTH(Today())-Month([stat_date])) & ' Months ',
((MONTH(Today())+12)-Month(stat_date))-1 & ' Months '
))
&
IF(MONTH(Today()) = MONTH(stat_date),DAY(Today()) - DAY(stat_date) & ' Days',
IF(DAY(Today()) > DAY(stat_date),DAY(Today()) - DAY(stat_date) & ' Days',
DAY(DATE(Interval(Today() - stat_date)))-1 & ' Days'
)) As PortfolioAge
Resident MCAZAprroved;
I get an error message, Table not found.
Please assist
Regards.
either rename your Table as MCAZAprroved
or use resident [MCAZAprroved]
the brackets are part of the name of your table
either rename your Table as MCAZAprroved
or use resident [MCAZAprroved]
the brackets are part of the name of your table
may be
mising the brakets of ur table name
Hi
Please check "PharmaMarketAudit.dbo.tblMCAZRegister" is available or not?
Can you post the error message screenshot?
I don't think square brackets matter here.
Although it would be helpful if you can post a screenshot of your error message
Many thanks, that solved my problem
Many thanks Sunny, the issue was on brackets
Many thanks, issue was on brackets
Many thanks for your input, brackets was the issue