Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i have 1400 fields in my data but i want to concatenate all fields how to concatenate all the fields by using looping
May be this helps check here:
How to get a list of fields in load script?
however, i still wonder why you want to concatenate 1400 fields. They are many to be in the data model.
i have 1400 fileds but i want to left first 5 fields and concatenate remaining 1396 fields
Do you mean fields or fieldvalues within a field? What is the aim of concatenating them?
- Marcus
Hi
i have fields like A,B,c,d,e,f.......upto 1000 fields. now i want to concatenate fields c,d,e,f,g.....upto 1000. just i am omit A,B like that i want.
there we have more than 1000 fields so i can't write concatenate keyword to all the fields so i want automatic looping operation
I think you need a code like below
vString = '';
FOR vCounter = 1 TO NoOfFields('YourTable')
vCurrentField = FieldName($(vCounter), 'YourTable');
IF not Match(vCurrentField, 'A', 'B', 'C'...) THEN
vString = vString & ', [$(vCurrentField)]';
ENDIF
NEXT
vString = Right(vString, Len(vString) - 2);
Concatenate([YouNewTable]): LOAD $(vString) Resident [YourTable] ;
it is showing error
Sorry, did not check. In Match() function paste fieldnames you don't want
vString = '';
FOR vCounter = 1 TO NoOfFields('YourTable')
vCurrentField = FieldName($(vCounter), 'YourTable');
IF not Match(vCurrentField, 'A', 'B') THEN
vString = vString & ', [$(vCurrentField)]';
ENDIF
NEXT
vString = Right(vString, Len(vString) - 2);
Concatenate([YouNewTable]) LOAD $(vString) Resident [YourTable] ;