4 Replies Latest reply: Aug 8, 2012 9:31 AM by Florian Pennetzdorfer RSS

    LOAD * and modify a certain field at the same time

    Florian Pennetzdorfer

      Hey,

       

      is there a neat way to LOAD * from a resident table and at the same time modify a certain field (without having to rename it)?

       

      Example:

      LOAD *, 
             if(peek(InvoiceNo) = InvoiceNo, 'cancelled', InvoiceNo) as InvoiceNo
      resident Invoices order by InvoiceNo asc, date desc)

       

      My attempt gives an error "Field names must be unique within table" ... which is obvious, as the field 'InvoiceNo' already exists in the resident table.

       

      Thanks for your ideas!