johnirl has asked for the wisdom of the Perl Monks concerning the following question:
Say you have two SQL statements. Imagine that the first one outputs the values for the columns A and B.
<code>Select A, B from table where something;<code>
<code> A B
- -
4 5
2 3
6 7 <code>
Now in my second SQL statement I want to get C such that A and B equals the values they returned above.
<code>select C from table where A=4 and B=5;
select C from table where A=2 and B=3;
select C from table where A=6 and B=7;
<code>
Anybody have an idea how I might implement this?
I'm using the DBI module for retrieving the results and most of my DBI info has been gottn from here and here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pipe the Output of a SQL statement into the Input of another
by Abigail-II (Bishop) on Jul 15, 2002 at 15:03 UTC | |
|
Re: Pipe the Output of a SQL statement into the Input of another
by Aristotle (Chancellor) on Jul 15, 2002 at 16:27 UTC | |
|
Re: Pipe the Output of a SQL statement into the Input of another
by amphiplex (Monk) on Jul 15, 2002 at 16:03 UTC | |
by Abigail-II (Bishop) on Jul 15, 2002 at 16:33 UTC |