2 Replies Latest reply: Aug 6, 2010 11:18 AM by julienb RSS

    No table name in the selected fields

    julienb

      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