Quantcast
Channel: SCN : Unanswered Discussions - SAP Crystal Reports
Viewing all articles
Browse latest Browse all 4814

Need to compare values of two columns in two different tables and print the corresponding value of another column accordingly

$
0
0

I have two tables in my database:

 

 

Table1 and Table2.

 

 

Table1 has two columns as A(string) and B(number).

 

 

Table2 has two columns as C(string ) and D (string).

 

 

 

Values in A are:

 

 

AA 7602

AA 7773

AA 8008

AA 8046

AA 8085

 

 

Values in B are:

 

0.02

0.03

0.03

0.08

0.20

 

 

Values in C are:

 

 

AA 7602

AA 7773

AA 8008

AA 8085

 

 

Values in D are:

 

 

AA 7602

AA 8046

AA 8085

 

 

 

 

Now, the requirement is to compare each values in C with each
values in A, wherever it matches, it should print the corresponding value of B.

 

 

If the value in C does not match with Values in A, it should
not print anything.

 

 

Similarly compare each values in D with each values in A,
wherever it matches, it should print the corresponding value of B.

 

 

If the value in D does not match with Values in A, it should
not print anything.

 

 

 

 

Thanks,

Shilpi


Viewing all articles
Browse latest Browse all 4814

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>