Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
richters
Partner - Contributor III
Partner - Contributor III

Compare ID-column to 1000 columns

Hi all,

I have got the problem that I need to compare my ID-column to about 1000 other columns with IDs in my table.

The problem is not that I don't know how to deal with it but my solution is very unperformant and this is in that case a big problem.

That I do in script is:

Load

MyID,

if(ID=C1 or ID=C2 or ID=C3 .... , 1,0) as solution

resident myTable;

Just to give u an idea.

The problem now is that QV can just handle about 170 or's in one load. So I need about 10 loads for it which costs me a lot of time.

Is there a solution where I maybe can just say : Well, if the ID is in this range of columns then...

Or : To combine all the C-columns and seperate them by ';' and then can do a very easy if-clause?

I am happy for every kind of solution.

Thank you in advance.

Regards!

3 Replies
Not applicable

could You post script sample? (I'm not sure what You want to get)

Gysbert_Wassenaar

You could try using the crosstable function to pivot the id-columns to rows. If you give the field with the id's the same name as your ID (in your example that's MyID) then you could associate the two tables. That way you can find the matches. I don't know how well crosstable performs on 1000 columns though.


talk is cheap, supply exceeds demand
richters
Partner - Contributor III
Partner - Contributor III
Author

Thank you guys,

I just connected the 10 loads to one, kind of simple...don't know why I did 10 loads instead of a big one...

@Gysbert : can you give me a simple Script-example which shows this?

I am handling here with thousands of variables and I think that FieldValue() does not work correctly in that dimension.