Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a list of 6000 unique customer details in a qvd. I'm taking the 6000 and splitting them into batches of 1000 as I need to call a 1000 at a time in Teradata script...
I'm successfully splitting the data into the batches, however when I want to store the batches into a variable within script, the variable content keeps on coming up empty as per below - the variable does get created, but the 1000 customer numbers does not store for some reason.
Am I doing something wrong, and can anyone propose a workaround?
Field-values couldn't be grabbed just by a reference to the field else it requires always a load or field-functions. In your case it should look like:
let var = peek('field-name', /* record-index */ 0, 'table-name');
- Marcus
Field-values couldn't be grabbed just by a reference to the field else it requires always a load or field-functions. In your case it should look like:
let var = peek('field-name', /* record-index */ 0, 'table-name');
- Marcus
I assume it's caused from your loop that you don't fill and/or query the right field/variable at the right time. For example you name the field batch$(i) - do you query afterwards also batch$(i) within the peek(). Something like this will be the reason. Personally I think you don't need to increment the fields and/or these variables else you could use a single one which is appropriate overwritten / assigned within each loop iteration.
- Marcus