3 Replies Latest reply: May 28, 2015 5:40 AM by Avinash R RSS

    Loading from the same table several times - and suddenly ...

    Friedrich Hofmann


      Hi,

       

      I have the following interesting problem:

      I load from a set of Excel tables (currently five) in a directory using a FOR EACH loop.

       

      Now, in one loop I load all five Excel tables in sequence and I have a preceding load with a clause like >> WHERE ISNUM(ID) <<
        => I want to make sure that I load only those records where there is an ID so that I can associate the records with some data
              that I have loaded earlier.

       

      Then comes a second loop over those same five tables that is actually identical BUT for the preceding load
        => The clause is exactly turned around, it's like >> WHERE NOT(ISNUM(ID)) <<
        => Here I want to load just those records that have no ID, but something like >> n.z. << (abbreviation for "not assignable") so I
             cannot associate those costs with anything (books or some other generic-use materials)

       

      => My problem now is, in that second loop, I get an error message stating that some field can't be found. Now I'm just about to rebuild
            the entire LOAD statement to find out why that could be, but I can actually not make head or tail of it because I have just loaded data
            from those same tables and the LOAD statement is exactly the same - and the first one worked fine ...

       

      Can anyone give me a hint where I should look for an error (except just reading the LOAD 1.000 times and hoping that at the 1.000th time I will notice something)?`

       

      Thanks a lot!

      Best regards,

       

      DataNibbler