Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DB2 :: RE: SQL query to run through list of values in table

$
0
0
Author: RahulG31
Subject: Reply to: SQL query to run through list of values in table
Posted: Thu Dec 15, 2016 3:08 am (GMT 5.5)

Quote:
RahulG31, I think, you are missing the relation between two tables.

I know. But from the original post, it is Not entirely clear whether the Table 2 will have an ID column (or possibly Not).

The tables may be like:

Table 1 as
Code:
ID
1
2
3

And Table 2 as:
Code:
CODE
A
B
C
D
E
F
G

And then, what the TS wants may be something like:
Code:
ID CODE
1 X
1 X
1 X
1 B
1 A
1 C
1 D
2 X
2 X
2 X
2 B
2 A
2 C
2 D
And so on . . .


Viewing all articles
Browse latest Browse all 9405

Trending Articles