Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm currently using table names as variables to select different fields thru vb code
I'm using a calendar table and calls various tables with a variable as =[$(TableSelected).YY RegistrationDate]), that is the link between the tables.
I'm experiencing an issue with my calendar table, as the table name (eg Calendar) is not recognized by the system, and the fields are listed without the table prefix (eg Calendar.YY RegistrationDate is displayed - and interpreted - with the solely field name, eg YY RegistrationDate).
Is it because my Calendar table is generated in my document, and not loaded from a QVD?
The syntax of the Calendar table is :
TEMP_DATE_TBL:
LOAD
DATE(date#('$(STARTDATE)','DD/MM/YYYY')-1 + RECNO() ,'DD/MM/YYYY') as DATE_REC
AUTOGENERATE (date#('$(ENDDATE)') - date#('$(STARTDATE)'))+1;
CALENDARTABLE:
LOAD
DATE_REC,
YEAR(DATE_REC) AS 'YY RegistrationDate',
MONTHNAME(DATE_REC) AS 'YY/MM RegistrationDate',
WEEKNAME(DATE_REC) AS 'YY/WW RegistrationDate',
DATE(DAYSTART(DATE_REC)) AS 'YY/MM/DD RegistrationDate',
MONTH(DATE_REC) AS 'MM RegistrationDate',
WEEK(DATE_REC) AS 'WW RegistrationDate',
DAY(DATE_REC) AS 'DD RegistrationDate',
QUARTERNAME(DATE_REC) AS 'YY/QQ RegistrationDate',
'Q' & CEIL(MONTH(DATE_REC)/3) AS 'QQ RegistrationDate',
DAYNUMBEROFYEAR(DATE_REC) AS 'DAY RegistrationDate'
RESIDENT TEMP_DATE_TBL;
if anyone could have an answer. I didn't find anything in the Community forums.
Thanx
Do you need the fields to be prefixed with the table name? To do this you need to use Qualify.
Add qualify *; before the load statement and all the following fields will be prefixed with table name (e.g "CALENDARTABLE.")
To turn of qualifying after the load, type unqualify *; (after the load statement)
You can find more details on this in the help file / reference manual
Do you need the fields to be prefixed with the table name? To do this you need to use Qualify.
Add qualify *; before the load statement and all the following fields will be prefixed with table name (e.g "CALENDARTABLE.")
To turn of qualifying after the load, type unqualify *; (after the load statement)
You can find more details on this in the help file / reference manual
oops.. my statement tab was before the qualify call 😞
thank you for your quick reply