Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: associating subkeys of separate HoH's

by Steve_p (Priest)
on Apr 09, 2004 at 20:25 UTC ( [id://344022]=note: print w/replies, xml ) Need Help??


in reply to associating subkeys of separate HoH's

I'm sorry if I'm misunderstanding something, but why are you using hashes to join with when the database can do the work for you.

my $sql1 = qq { SELECT a.*, b.*, c.* FROM table1 a, table2 b, table3 c WHERE a.primary_key = b.foreign_key and a.foreign_key2 = c.foreign_key2 };

The join syntax may be slightly different depending on your database and the flavor of SQL, but hopefully that should be a lot easier than trying to join by hash.

Replies are listed 'Best First'.
Re: Re: associating subkeys of separate HoH's
by 3dbc (Monk) on Apr 15, 2004 at 18:58 UTC
    Unfortunately, I am using DBD::Xbase which does not support table join syntax.

      The documentation for DBD::XBase is quite clear on this point:

      Please note that you can only select from one table, joins are not supported and are not planned to be supported. If you need them, get a real RDBMS (or send me a patch).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2024-04-19 07:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found