4 Replies Latest reply: Sep 27, 2012 4:25 AM by Jason Michaelides RSS

    Column as a flag by prefixing

    Oldrich Hlavacek

      Hello,

      I'm QVbeginner and I would like to fill some field in table as flag.

       

      I have table with many columns, about 1 mil. records about accounts from database. I need to create new column as flag: 0 = the row is'nt project/invest, 1 = the row is project/invest.

      I know the investment according to the prefix of a specific column in Main table (col. Code). But prefixes are not fixed, prefixes may change each year, so I need load it from XLS spreadsheet.

       

      Main

      YearCol2Code...
      IsInvProj
      2010......
      0
      2011...CGB_15845689
      1
      2011
      CGH_1548666
      0
      .........
      ...
      2012
      CGI_1580125
      1
      ...



       

       

      Prefixes

      YearPrefixProjectsPrefixInvest
      2011CGB_CGIP_
      2012CGP_CGI_






       

       

      Please advice how to effectively perform column, what I need to do steps and mapping. Or a completely different approach? I have only idea with create concat from year and prefix "2011CBG_" and it compare with Year+Code in table Main. But how...

      For mapping I can read PrefixProjects and PrefixInvest as two separatelly table.

      Thanks,

      O.