Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Pipe the Output of a SQL statement into the Input of another

by amphiplex (Monk)
on Jul 15, 2002 at 16:03 UTC ( [id://181835]=note: print w/replies, xml ) Need Help??


in reply to Pipe the Output of a SQL statement into the Input of another

Why not simply do
select c,a,b from table where something;
?
---- amphiplex

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 16:33 UTC
    Consider the following table:
     
       A  B  C  D
     
       4  5  1  7
       4  5  2  8
    
    And the where clause being D = 7. Then your select would return just one line, and miss the C = 2. If you first select the A = 4, B = 5, and then go for the C, you get both lines.

    Abigail

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://181835]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2025-03-28 08:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When you first encountered Perl, which feature amazed you the most?










    Results (71 votes). Check out past polls.

    Notices?
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.