Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

while - script function

hi all,

in my script i use while function in a proceeding load  to generate new date field between two date fields.

the new date field is OK ,

the problem is that some other fields in the table become null after loading the script.

any ideas?

TempTable:

Load

Field1,

field2,

DateField1,

DateField2,

Field4

From TempTable (qvd);

NoConcatenate

Load *,

Date(DateField1 + IterNo() -1) as ConnectDate

WHILE DateField1 + IterNo () -1<= DtaeField2;

Table1:

Load

Field1,

Field2,

Datefield1,

DateField2,

Field4


Resident TempTable;

drop table TempTable;

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I can't see why these fields should become NULL.

Are you maybe loading other tables, and maybe linking Table1 to the other tables using ConnectDate?

Then you are maybe using a table box to view ConnectDate key field values that only appear in this other table, not in your Table1, in combination with fields from Table1.

View solution in original post

2 Replies
sunny_talwar

May be just do this

Table1:

Load Field1,

    field2,

    DateField1,

    DateField2,

    Field4,

    Date(DateField1 + IterNo() -1) as ConnectDate

From TempTable (qvd)

WHILE DateField1 + IterNo () -1<= DtaeField2;

swuehl
MVP
MVP

I can't see why these fields should become NULL.

Are you maybe loading other tables, and maybe linking Table1 to the other tables using ConnectDate?

Then you are maybe using a table box to view ConnectDate key field values that only appear in this other table, not in your Table1, in combination with fields from Table1.